/* The disease article as it appears inside a chat answer. Everything is under .dpage so nothing
   here touches the rest of the app. Colours come from the tokens in styles.css. */

/* An article is wider than an answer, so a thread that holds one widens to 1,200 px for the article itself. */
.thread:has(.dpage:not(.dp-inline)){max-width:1240px;}
/* Every other message in that chat keeps the width it has in any chat (880 px less the thread's side padding). */
.thread:has(.dpage:not(.dp-inline)) .msg:not(:has(.dpage:not(.dp-inline))){max-width:840px; margin-left:auto; margin-right:auto;}

.dpage{--ui:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --read:var(--ui);
  background:var(--card); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow);
  padding:24px 30px 16px; color:var(--ink); font-family:var(--ui); container-type:inline-size;}
.dpage *{box-sizing:border-box}
.dpage button{font:inherit; color:inherit; background:none; border:none; padding:0; cursor:pointer; text-align:left;}
.dpage button:focus-visible, .dpage a:focus-visible, .dpage summary:focus-visible{outline:2px solid var(--accent);
  outline-offset:2px; border-radius:4px;}

.dp-label{font-size:11.5px; letter-spacing:.07em; text-transform:uppercase; color:var(--mut); font-weight:500;}

.dp-head{margin-bottom:16px;}
.dp-title{font-family:var(--read); font-weight:600; font-size:29px; line-height:1.15; letter-spacing:-.018em;
  margin:2px 0 0; padding-bottom:9px; border-bottom:1px solid var(--line); text-wrap:balance;}

.dp-body{display:grid; grid-template-columns:minmax(0,1fr) clamp(250px,19cqw,300px); gap:clamp(28px,3cqw,44px); align-items:stretch;}
.dp-main{min-width:0;}
/* The right pane stays in view beside the article and scrolls on its own when it is taller than the screen. */
.dp-rail{min-width:0; display:flex; flex-direction:column; gap:16px; position:sticky; top:14px; align-self:start;
  max-height:var(--dp-room, calc(100vh - 320px)); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin;
  padding-right:6px;}

/* The text itself, with room between lines so long sections stay easy to read. */
.dp-opening, .dp-group{font-family:var(--read); font-size:15px; line-height:1.6; color:var(--ink);}
.dp-opening p, .dp-group p{margin:0 0 9px;}
.dp-group p:last-child, .dp-opening p:last-child{margin-bottom:0;}
.dp-group b{font-weight:600;}

.dp-section{margin-top:28px; scroll-margin-top:14px;}
.dp-h2{font-family:var(--read); font-size:21px; line-height:1.2; font-weight:600; letter-spacing:-.012em;
  color:var(--accent-dk); margin:0 0 10px; padding-bottom:6px; border-bottom:1px solid var(--line);}
.dp-group{display:flow-root; margin-top:18px; scroll-margin-top:14px;}
.dp-h2 + .dp-group{margin-top:0;}
.dp-h3{font-family:var(--read); font-size:15.5px; line-height:1.3; font-weight:600; letter-spacing:-.005em; color:var(--ink);
  margin:0 0 6px; display:flex; align-items:center; gap:9px;}
.dp-h3::before{content:""; flex:none; width:4px; height:15px; border-radius:2px; background:var(--accent);}
.dp-h3::after{content:""; flex:1; height:1px; background:var(--line);}

/* A sentence's sources: a small raised number, the count of papers behind it. It stays on the
   same line as the last word of its sentence. */
.dp-keep{white-space:nowrap;}
.dpage, .dp-veil, .answer{--doc-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E");}
.dpage .dp-cite, .answer .dp-cite{font-family:var(--ui); font-size:11px; line-height:1.5; font-weight:500; color:var(--accent-dk);
  font-variant-numeric:tabular-nums; display:inline-flex; align-items:center; gap:3px; vertical-align:1px;
  background:var(--accent-bg); border:1px solid transparent; border-radius:999px; padding:0 7px 0 6px; margin:0 0 0 4px;
  white-space:nowrap; cursor:pointer;}
.dpage .dp-cite::after, .answer .dp-cite::after{content:''; width:8px; height:8px; flex:none; background:currentColor; opacity:.8;
  -webkit-mask:var(--doc-icon) center/contain no-repeat; mask:var(--doc-icon) center/contain no-repeat;}
.dpage .dp-cite:hover, .dpage .dp-cite.on, .answer .dp-cite:hover, .answer .dp-cite.on{border-color:var(--accent);}

.dp-bubble{position:absolute; z-index:80; background:var(--card); border:1px solid var(--line); border-radius:12px;
  box-shadow:var(--shadow); overflow-y:auto; font-size:12.5px; line-height:1.5; color:var(--sec); scrollbar-width:thin;}
/* The heading stays put at the top of the pop-up while the papers scroll under it. */
.dp-bubble-head{position:sticky; top:0; z-index:1; background:var(--card); padding:10px 14px 8px;
  border-bottom:1px solid var(--line); font-size:11px; letter-spacing:.07em; text-transform:uppercase; color:var(--mut);}
.dp-bubble-row{display:flex; gap:9px; margin:0 14px; padding:8px 0; border-top:1px solid var(--line);}
.dp-bubble-head + .dp-bubble-row{border-top:none;}
.dp-bubble-row:last-child{padding-bottom:12px;}
.dp-bubble-all{display:block; margin:4px 14px 12px; padding:0; border:none; background:none; font:inherit; font-size:12px;
  color:var(--accent-dk); cursor:pointer;}
.dp-bubble-all:hover{text-decoration:underline;}
.dp-bubble-n{flex:none; color:var(--accent-dk); font-weight:600; font-variant-numeric:tabular-nums; min-width:22px;}
.dp-bubble a{color:var(--accent-dk); text-decoration:none;}
.dp-bubble a:hover{text-decoration:underline;}

/* A picture tucked into the text it belongs to; the paragraph runs around it. */
.dp-tuck{width:clamp(210px,27%,330px); margin:4px 0 10px 22px; float:right; clear:right; font-family:var(--ui);}
.dp-tuck.left{float:left; clear:left; margin:4px 22px 10px 0;}
.dp-tuck img{display:block; width:100%; max-height:280px; object-fit:cover; border-radius:6px;
  border:1px solid var(--line); background:#fff;}
.dp-tuck figcaption{font-size:12px; line-height:1.4; color:var(--sec); margin-top:5px;}
.dp-tuck .dp-cap{display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden;}
.dp-credit{display:block; font-size:10.5px; line-height:1.4; color:var(--mut); margin-top:2px;}
.dp-credit .dp-cite{vertical-align:baseline; font-size:10.5px;}

.dp-leadpic{margin:0;}
.dp-leadpic img{display:block; width:100%; max-height:200px; object-fit:cover;}
.dp-leadpic figcaption{padding:7px 11px 2px; font-size:11.5px; line-height:1.4; color:var(--sec);}
.dp-links{display:flex; flex-wrap:wrap; gap:6px; padding:0 12px 12px;}
.dp-links a{font-size:11.5px; color:var(--sec); text-decoration:none; border:1px solid var(--line2); border-radius:999px;
  padding:1px 9px; background:var(--card);}
.dp-links a:hover{color:var(--accent-dk); border-color:var(--accent);}

.dp-toc{flex:none; font-size:12.5px; line-height:1.4; padding:2px 0 2px 16px; border-left:2px solid var(--line);}
.dp-toc ul{list-style:none; margin:0; padding:0;}
.dp-toc > ul{margin-top:8px;}
.dp-toc button{display:block; width:100%; padding:3px 0; color:var(--sec);}
.dp-toc > ul > li > button{font-weight:600; color:var(--ink);}
.dp-toc ul ul{margin:0 0 6px; padding-left:12px;}
.dp-toc ul ul button{font-size:12px; padding:2px 0;}
.dp-toc button:hover{color:var(--accent-dk);}
.dp-toc button{position:relative;}
.dp-toc button.on, .dp-toc > ul > li > button.on{color:var(--accent-dk);}
.dp-toc ul ul button.on{font-weight:600;}
.dp-toc button.on::before{content:""; position:absolute; left:-16px; top:4px; bottom:4px; width:3px; border-radius:2px; background:var(--accent);}
.dp-toc ul ul button.on::before{left:-28px;}

.dp-jump{display:none; flex-wrap:wrap; align-items:center; gap:6px; padding:18px 0 0;}
.dp-jump .dp-label{margin-right:4px;}
.dp-jump button{font-size:12.5px; color:var(--sec); border:1px solid var(--line2); border-radius:999px; padding:2px 11px;}
.dp-jump button:hover{color:var(--accent-dk); border-color:var(--accent); background:var(--accent-bg);}

.dp-figs{display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:14px;}
.dp-more{clear:both; margin-top:12px; font-family:var(--ui);}
.dp-fig{margin:0;}
.dp-fig img{display:block; width:100%; height:165px; object-fit:cover; border-radius:6px; border:1px solid var(--line); background:#fff;}
.dp-fig figcaption{padding-top:5px; font-size:12px; line-height:1.4; color:var(--sec);}
.dp-fig .dp-cap{display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden;}

.dp-fold{margin-top:28px; scroll-margin-top:14px;}
.dp-fold > summary{list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid var(--line); padding-bottom:6px;}
.dp-fold > summary::-webkit-details-marker{display:none}
.dp-fold > summary .dp-h2{border:none; margin:0; padding:0;}
.dp-chev{flex:none; width:9px; height:9px; border-right:1.6px solid var(--mut); border-bottom:1.6px solid var(--mut);
  transform:rotate(-45deg); transition:transform .15s; margin-right:6px;}
details[open] > summary .dp-chev{transform:rotate(45deg);}
.dp-fold-body{padding:12px 0 4px;}
.dp-refs{margin:0; padding:0 0 0 34px; font-size:12.5px; line-height:1.5; color:var(--sec);}
.dp-refs li{margin:0 0 6px; padding-left:4px;}
.dp-refs a{color:var(--accent-dk); text-decoration:none;}
.dp-refs a:hover{text-decoration:underline;}

.dp-empty{color:var(--sec);}

/* What is most reported with the disease, drawn once when the page is built. Each type keeps the
   colour the rest of the app gives it. */
.dp-graph{margin:18px 0 0; padding:16px 18px 12px; border-radius:14px; background:var(--bg);
  scroll-margin-top:14px; overflow-x:auto;}
.dp-graph svg{display:block; width:100%; min-width:640px; max-width:860px; height:auto; margin:0 auto; font-family:var(--ui);}
.dp-edge{fill:none; stroke:var(--tc); stroke-opacity:.38; stroke-linecap:round;}
.dp-node{cursor:pointer; outline:none;}
.dp-node circle{fill:var(--tc); fill-opacity:.86; stroke:var(--tc); stroke-width:1.2;}
.dp-node text{font-size:12.5px; fill:var(--sec);}
.dp-node:hover circle, .dp-node:focus-visible circle{fill-opacity:1; stroke-width:3; stroke-opacity:.35;}
.dp-node:hover text, .dp-node:focus-visible text{fill:var(--ink);}
.dp-ghead{cursor:pointer; outline:none;}
.dp-ghead text{font-size:12px; font-weight:600; fill:var(--tc); letter-spacing:.02em;}
.dp-ghead .dp-gcount{font-weight:400; fill:var(--mut);}
.dp-ghead:hover text, .dp-ghead:focus-visible text{text-decoration:underline;}
.dp-pill{fill:var(--accent-bg); stroke:var(--accent); stroke-width:1;}
.dp-pillname{font-size:14.5px; font-weight:600; fill:var(--accent-dk);}
.dp-graph-cap{margin:6px 0 0; font-size:11.5px; line-height:1.45; color:var(--mut);}

/* The top of the page: the picture, four facts and the signs found throughout the body on the left, and
   the body map on the right. Without a body map, the picture and the facts sit side by side. */
.dp-top{display:grid; grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr); gap:26px clamp(30px,5cqw,68px); align-items:start;
  margin:6px 0 30px; padding:6px 0 30px; border-bottom:1px solid var(--line); font-family:var(--ui);}
.dp-top-alone{grid-template-columns:minmax(0,1fr);}
.dp-top-alone .dp-profile{display:grid; grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr); column-gap:clamp(30px,5cqw,68px);
  align-items:start;}
.dp-top-alone .dp-badges{grid-column:1 / -1;}
.dp-top-alone .dp-pairs{margin-top:0;}
.dp-top-alone .dp-profile:not(:has(.dp-leadpic)) .dp-pairs{grid-column:1 / -1;}
.dp-badges{display:flex; align-items:center; gap:10px; margin-bottom:14px;}
.dp-badge{font-size:11.5px; font-weight:600; letter-spacing:.02em; color:var(--accent-dk); background:var(--accent-bg);
  border-radius:999px; padding:3px 11px;}
.dp-id{font-size:12px; color:var(--mut);}
.dp-profile{display:flex; flex-direction:column; min-width:0;}
.dp-profile .dp-leadpic{margin:0;}
.dp-profile .dp-leadpic a{display:block;}
.dp-profile .dp-leadpic img{display:block; width:100%; height:230px; max-height:none; border-radius:14px; object-fit:cover;
  background:var(--bg);}
.dp-profile .dp-drawing img{object-fit:contain; padding:12px;}
.dp-profile .dp-leadpic figcaption{padding:8px 2px 0; font-size:11px; line-height:1.45; color:var(--mut);}
.dp-profile .dp-leadpic figcaption .dp-credit{display:inline; margin:0 0 0 4px;}
.dp-pairs{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 20px; margin:16px 0 0; padding:14px 16px;
  background:var(--bg); border-radius:14px;}
.dp-pair{min-width:0;}
.dp-pair dt{font-size:10.5px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--mut);}
.dp-pair dd{margin:4px 0 0; font-size:15px; line-height:1.3; font-weight:600; color:var(--ink); overflow-wrap:anywhere;}

/* Where the signs are reported, drawn on a figure. Each part lights up in its own colour, brighter where more
   papers report its signs, and each lit part is named beside the figure with its number of signs. */
.dp-body-map svg{display:block; width:100%; max-width:580px; height:auto; margin:0 auto; overflow:visible; font-family:var(--ui);}
.dp-ptitle{margin:0 0 10px; font-family:var(--ui); font-size:11px; line-height:1.3; font-weight:700; letter-spacing:.09em;
  text-transform:uppercase; color:var(--accent-dk);}
.dp-body-map{align-self:stretch; display:flex; flex-direction:column; padding:16px 18px 18px; background:var(--bg); border-radius:14px;}
.dp-body-map svg{margin:auto;}
.dp-figure{fill:var(--card); stroke:var(--line2); stroke-width:1.3;}
.dp-figure.dp-skin{stroke:var(--oc); stroke-opacity:var(--on); stroke-width:2.4;}
.dp-organ-off{fill:none; stroke:var(--line2); stroke-width:1;}
.dp-organ{fill:var(--oc); fill-opacity:var(--on); stroke:var(--oc); stroke-opacity:.9; stroke-width:.9;
  transition:fill-opacity .15s;}
.dp-callout{fill:none; stroke:var(--mut); stroke-opacity:.45; stroke-width:.9;}
.dp-pin{fill:var(--card); stroke:var(--oc); stroke-width:1.4;}
.dp-part{cursor:pointer; outline:none;}
.dp-part-name{font-size:13.5px; font-weight:600; fill:var(--ink);}
.dp-part-n{font-size:12px; fill:var(--mut);}
.dp-part:hover .dp-organ, .dp-part:focus-visible .dp-organ{fill-opacity:1;}
.dp-part:hover .dp-part-name, .dp-part:focus-visible .dp-part-name{fill:var(--accent-dk);}
.dp-part:hover .dp-callout, .dp-part:focus-visible .dp-callout{stroke-opacity:.9;}
.dp-wholes{display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0;}
.dp-throughout{margin-top:16px; padding:14px 16px 10px; background:var(--bg); border-radius:14px;}
.dp-thr-list{margin:0;}
.dpage .dp-dg-c.dp-thr{width:calc(100% + 14px); margin:0 -7px 1px; font-size:12.5px; padding:4px 7px;}
.dpage .dp-dg-c.dp-thr:hover{background:var(--card);}
.dpage .dp-dg-c.dp-thr em{color:var(--ink); white-space:normal; line-height:1.35;}
.dpage .dp-dg-c.dp-thr s{width:72px;}
.dpage .dp-dg-c.dp-thr:hover em{color:var(--accent-dk);}
.dp-parts-list{justify-content:center; margin-top:14px;}
.dpage .dp-whole{display:inline-flex; align-items:baseline; gap:6px; font-size:12px; color:var(--ink); background:var(--accent-bg);
  border-radius:999px; padding:3px 10px;}
.dp-whole span{color:var(--accent-dk); font-variant-numeric:tabular-nums;}
.dpage .dp-whole:hover{background:var(--accent); color:#fff;}
.dpage .dp-whole:hover span{color:#fff;}
.dp-parts-list{display:none;}
.dp-ids{flex:none; font-size:12px; color:var(--sec);}
.dp-ids .dp-label{margin-bottom:6px;}
.dp-idrow{display:flex; justify-content:space-between; gap:10px; padding:4px 0; border-top:1px solid var(--line);}
.dp-idrow span:last-child{color:var(--ink); font-variant-numeric:tabular-nums;}
.dp-ids .dp-links{padding:8px 0 0;}
.dp-rail .dp-toc{margin-top:2px;}

/* Every entity of one type, under the section it belongs to. */
.dp-list{margin-top:14px; font-family:var(--ui); clear:both;}
.dp-list-head{display:flex; align-items:center; gap:7px; font-size:12px; color:var(--sec); margin-bottom:7px;}
.dp-dot{flex:none; width:8px; height:8px; border-radius:50%; background:var(--tc);}
.dp-chips{display:flex; flex-wrap:wrap; gap:6px;}
.dp-chips.dp-folded{max-height:58px; overflow:hidden;}
.dp-chips.dp-open{max-height:230px; overflow-y:auto; overscroll-behavior:contain; padding:10px; background:var(--bg);
  border:1px solid var(--line2); border-radius:9px; scrollbar-width:thin;}
.dpage .dp-chip{display:inline-flex; align-items:baseline; gap:6px; font-size:12.5px; line-height:1.3; color:var(--ink);
  background:var(--bg); border:1px solid var(--line); border-radius:7px; padding:4px 9px; text-decoration:none;
  white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis;}
.dp-chips.dp-open .dp-chip{background:var(--card);}
.dpage a.dp-chip:hover, .dpage button.dp-chip:hover{border-color:var(--tc, var(--accent)); color:var(--accent-dk);}
.dp-chip-n{font-size:11px; color:var(--mut); font-variant-numeric:tabular-nums;}
.dp-chip-t{font-size:10.5px; color:var(--mut);}
.dpage .dp-all{margin-top:7px; font-size:12px; color:var(--accent-dk);}
.dpage .dp-all:hover{text-decoration:underline;}

/* A pathway diagram from PathBank on a card. The picture sits on the blue PathBank draws on, so
   diagrams of every shape fill their card the same way. It opens large when selected. */
.dp-paths{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px;}
.dp-paths.dp-folded .dp-late{display:none;}
.dp-path{margin:0; display:flex; flex-direction:column; border:1px solid var(--line); border-radius:10px; overflow:hidden;
  background:var(--card); transition:border-color .15s, box-shadow .15s;}
.dp-path:hover{border-color:var(--tc); box-shadow:var(--shadow);}
.dpage .dp-zoom{display:block; position:relative; width:100%; cursor:zoom-in; background:#000099;}
.dp-path img{display:block; width:100%; height:200px; padding:10px; object-fit:contain;}
.dp-zoom::after{content:''; position:absolute; top:8px; right:8px; width:26px; height:26px; border-radius:7px;
  background:rgba(255,255,255,.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 3h6v6M21 3l-7 7M9 21H3v-6M3 21l7-7' fill='none' stroke='%2318181b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat;
  opacity:.75; transition:opacity .15s;}
.dp-zoom:hover::after, .dp-zoom:focus-visible::after{opacity:1;}
.dp-path figcaption{padding:9px 12px 10px; font-family:var(--ui); font-size:12px; line-height:1.4; color:var(--sec);}
.dp-path .dp-cap{display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  font-size:13px; font-weight:600; line-height:1.3; color:var(--ink);}
.dp-credit a{color:inherit;}
.dp-veil-card.dp-veil-pic{width:min(1500px, 96vw); max-height:92vh;}
.dp-veil-pic img{display:block; width:100%; height:auto; border-radius:6px; background:#fff;}

.dp-tip{position:absolute; z-index:81; pointer-events:none; background:var(--card); border:1px solid var(--line2);
  border-radius:7px; padding:5px 9px; font-family:Inter,system-ui,sans-serif; font-size:12px; line-height:1.4;
  color:var(--ink); white-space:nowrap; box-shadow:var(--shadow); transform:translate(-50%,calc(-100% - 8px));}

.dpage b.dp-flash, .dpage .dp-chip.dp-flash{background:var(--accent-bg); color:var(--accent-dk); border-radius:4px;
  box-shadow:0 0 0 3px var(--accent-bg);}

/* What was recorded of the reported patients: who they were, then cause, treatment and outcome.
   The same cards the Cases page draws. */
.dp-dgs{display:grid; grid-template-columns:repeat(auto-fit, minmax(230px, 1fr)); gap:12px; margin:8px 0 0;
  font-family:var(--ui);}
.dp-dgs.roomy{grid-template-columns:repeat(auto-fit, minmax(310px, 1fr));}
.dp-dgs.roomy .dp-dg-c{align-items:flex-start;}
.dp-dgs.roomy .dp-dg-c em{white-space:normal; overflow:visible; line-height:1.4;}
.dp-dgs.roomy .dp-dg-c s{margin-top:4px;}
.dp-dg{border:1px solid var(--line); border-radius:10px; padding:12px 14px; background:var(--card); min-width:0;
  --one:#2a78d6; --two:#eb6834;
  --doc-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E");}
.dp-dg-h{display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; font-size:11.5px; color:var(--mut);
  margin:0 0 10px; padding:0 0 8px; border-bottom:1px solid var(--line);}
.dp-dg-h b{font-size:12.5px; font-weight:600; color:var(--ink); letter-spacing:.01em; flex:1 0 100%; margin:0 0 4px;}
.dp-dg-h > i{margin-right:auto; font-style:normal; color:var(--mut); white-space:nowrap; font-variant-numeric:tabular-nums;}
.dp-dg-h > i::after{content:' entries'; font-variant-numeric:normal;}
.dp-dg-p{display:block; width:100%; height:74px; overflow:visible;}
.dp-dg-p rect{fill:var(--one); opacity:.88;}
.dp-dg-p line{stroke:var(--line); stroke-width:1;}
.dp-dg-p line.med{stroke:var(--two); stroke-width:1.6; stroke-dasharray:4 3;}
.dp-dg-b{display:flex; align-items:flex-end; justify-content:center; gap:34px; height:74px; border-bottom:1px solid var(--line);}
.dp-dg-b .dp-col{display:flex; flex-direction:column; align-items:center; justify-content:flex-end; width:54px; height:100%;}
.dp-dg-b u{text-decoration:none; font-size:11.5px; color:var(--sec); margin:0 0 4px; font-variant-numeric:tabular-nums;}
.dp-dg-b i{width:100%; flex:none; background:var(--one); border-radius:3px 3px 0 0;}
.dp-dg-b .two i{background:var(--two);}
.dp-dg-bl{display:flex; justify-content:center; gap:34px; margin:6px 0 0;}
.dp-dg-bl span{width:54px; text-align:center; font-size:11.5px; color:var(--sec);}
.dp-dg-b.wide{gap:6px; justify-content:space-between;}
.dp-dg-b.wide .dp-col{flex:1; width:auto;}
.dp-dg-b.wide u{font-size:11px; color:var(--mut);}
.dp-dg-bl.wide{gap:6px; justify-content:space-between;}
.dp-dg-bl.wide span{flex:1; width:auto; font-size:10.5px; color:var(--mut);}
.dp-dg-ax{display:flex; justify-content:space-between; margin:5px 0 0;}
.dp-dg-ax span{font-size:10.5px; color:var(--mut); font-variant-numeric:tabular-nums;}
.dp-dg-d{position:relative; height:74px; border-bottom:1px solid var(--line);}
.dp-dg-d i{position:absolute; top:50%; width:10px; height:10px; margin:-5px 0 0 -5px; border-radius:50%;
  background:var(--one); opacity:.5;}
.dp-dg-d u{position:absolute; top:6px; bottom:0; width:0; text-decoration:none; border-left:2px dashed var(--two);}
.dp-dg-d u::after{content:''; position:absolute; left:-6px; top:0; bottom:0; width:12px;}
.dp-dg-list{margin:0 -7px; max-height:150px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin;}
.dp-dg-c{display:flex; align-items:center; gap:8px; font-size:11.5px; margin:0 0 2px; padding:2px 7px; border-radius:6px;}
.dp-dg-c:hover{background:var(--bg);}
.dp-dg-c em{flex:1; min-width:0; font-style:normal; color:var(--sec); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.dp-dg-c s{flex:none; width:58px; height:7px; border-radius:4px; background:var(--line2); overflow:hidden; text-decoration:none;}
.dp-dg-c s i{display:block; height:100%; background:var(--accent);}
.dp-dg-c u{flex:none; text-decoration:none; width:30px; text-align:right; color:var(--mut); font-variant-numeric:tabular-nums;}
.dp-dg-v{font-size:12px; color:var(--ink); line-height:1.5; margin:9px 0 0;}
.dp-aside{color:var(--sec);}
.dpage .dp-papers, .dp-veil .dp-papers{font-size:11.5px; font-weight:400; line-height:1.5; vertical-align:baseline; opacity:1;
  display:inline-flex; align-items:center; gap:4px; white-space:nowrap; font-variant-numeric:tabular-nums;
  color:var(--accent-dk); cursor:pointer; border:1px solid transparent; font-family:inherit;}
.dp-papers::after{content:''; width:9px; height:9px; flex:none; background:currentColor; opacity:.85;
  -webkit-mask:var(--doc-icon) center/contain no-repeat; mask:var(--doc-icon) center/contain no-repeat;}
.dpage .dp-papers.pill, .dp-veil .dp-papers.pill{background:var(--accent-bg); border-radius:999px; padding:0 8px 0 7px; margin:0;}
.dpage .dp-papers.pill:hover{border-color:var(--accent);}
.dpage .dp-papers.bare, .dp-veil .dp-papers.bare{flex:none; width:30px; margin:0; padding:0; justify-content:flex-end; background:none;}
.dpage .dp-papers.bare:hover{background:none; text-decoration:underline;}
.dpage .dp-grow, .dp-veil .dp-grow{--out:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 3h6v6M21 3l-7 7M9 21H3v-6M3 21l7-7' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  flex:none; width:18px; height:18px; color:var(--mut); display:inline-flex; align-items:center; justify-content:center;
  align-self:center;}
.dp-grow::before{content:''; width:12px; height:12px; background:currentColor;
  -webkit-mask:var(--out) center/contain no-repeat; mask:var(--out) center/contain no-repeat;}
.dpage .dp-grow:hover{color:var(--accent-dk);}

/* One card opened large, over the page. */
.dp-veil{position:fixed; inset:0; z-index:70; background:rgba(0,0,0,.45); display:flex; align-items:center;
  justify-content:center; font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;}
.dp-veil-card{background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px 18px;
  width:660px; max-width:92vw; max-height:84vh; overflow:auto; color:var(--ink);}
.dp-veil-card header{display:flex; align-items:baseline; gap:14px; margin:0 0 2px;}
.dp-veil-card header b{flex:1; font-size:14px; font-weight:600;}
.dp-veil-x{font:inherit; font-size:20px; line-height:1; color:var(--mut); background:none; border:0; cursor:pointer; padding:0;}
.dp-veil-n{margin:0 0 10px; font-size:12px; color:var(--mut);}
.dp-veil .dp-dg{border:0; padding:0; background:none;}
.dp-veil .dp-dg-list{max-height:none; overflow:visible;}
.dp-veil .dp-dg-p, .dp-veil .dp-dg-d{height:200px;}
.dp-veil .dp-dg-b{height:220px;}
.dp-veil .dp-dg-b .dp-col{width:76px;}
.dp-veil .dp-dg-bl span{width:76px;}
.dp-veil .dp-dg-b.wide .dp-col, .dp-veil .dp-dg-bl.wide span{width:auto;}
.dp-veil .dp-dg-v{font-size:13px;}
.dp-veil .dp-dg-c em{white-space:normal;}

.dp-care{flex:none; display:flex; align-items:center; justify-content:center; gap:7px; font-size:12.5px;
  color:var(--accent-dk); background:var(--accent-bg); border:1px solid var(--accent); border-radius:9px;
  padding:8px 12px; text-decoration:none;}
.dp-care:hover{background:var(--accent); color:#fff;}

@container (max-width:900px){
  .dp-body{grid-template-columns:minmax(0,1fr); gap:24px;}
  .dp-rail{order:-1; position:static; max-height:none; overflow:visible; padding-right:0;}
  .dp-toc{display:none;}
  .dp-jump{display:flex;}
  .dp-leadpic img{max-height:280px;}
  .dp-top{grid-template-columns:minmax(0,1fr);}
}
@container (max-width:600px){
  .dp-top{padding:18px;}
  .dp-body-map .dp-part-name, .dp-body-map .dp-part-n, .dp-body-map .dp-callout, .dp-body-map .dp-pin{display:none;}
  .dp-body-map svg{max-width:300px;}
  .dp-parts-list{display:flex;}
  .dp-title{font-size:25px;}
  .dp-h2{font-size:19px;}
  .dp-tuck, .dp-tuck.left{float:none; width:auto; margin:4px 0 16px;}
  .dp-tuck img{max-height:320px;}
}
@media (max-width:640px){
  .dpage{padding:18px 16px 10px; border-radius:12px;}
}
@media (prefers-reduced-motion:reduce){ .dp-chev, .dp-path, .dp-zoom::after{transition:none;} }

/* The genes panel (genes.js): EUGLID's genes for the disease, and a card for the gene picked with its
   exon map, its protein and a 3D structure. ClinVar's verdicts go from dark red (pathogenic) to amber. */
.dpage{--gn-p:#c0392b; --gn-pl:#e07a3a; --gn-l:#eeb046; --gn-f1:#2f6db5; --gn-f2:#8fb2df; --gn-f3:#2e9e6e;}
:root[data-theme="dark"] .dpage{--gn-p:#ee6b5f; --gn-pl:#f19a5c; --gn-l:#f3c66f; --gn-f1:#6c9fe4; --gn-f2:#a6c3ec; --gn-f3:#4cc08a;}
.gn-panel{margin-top:24px; padding:18px 20px 16px; background:var(--bg); border-radius:16px;}
.dpage.dp-inline{background:none; border:none; box-shadow:none; padding:0;}
.dp-inline .gn-panel{margin:0 0 18px; background:var(--card); border:1px solid var(--line);}
.gn-about{font-size:12px; line-height:1.5; color:var(--mut); margin:16px 0 0;}
.gn-card:empty + .gn-about{margin-top:0;}
.gn-panel .dp-chip{background:var(--card);}
.dpage .dp-chip.on{border-color:var(--tc, var(--accent)); color:var(--accent-dk); background:var(--accent-bg);}
.gn-panel > .dp-label{margin-bottom:10px;}
.gn-card{margin-top:16px;}
.dp-label + .gn-card{margin-top:0;}
.gn-head{display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 10px; font-family:var(--ui);}
.gn-head b{font-size:18px; font-weight:600;}
.gn-head span{font-size:12.5px; color:var(--sec);}
.gn-top{display:grid; grid-template-columns:minmax(0,1fr) 196px; gap:22px; align-items:start; margin-top:8px;}
.gn-top.gn-alone{grid-template-columns:minmax(0,1fr);}
.gn-say{margin:0 0 10px;}
.gn-facts{display:grid; grid-template-columns:118px minmax(0,1fr); gap:9px 14px; margin:0; font-family:var(--ui);}
.gn-facts dt{font-size:12px; color:var(--mut); padding-top:2px;}
.gn-facts dd{margin:0; font-size:14px; line-height:1.5;}
.gn-rate{font-weight:600;}
.gn-3d{margin:0; background:var(--card); border-radius:12px; padding:10px;}
.gn-3d img{display:block; width:100%; aspect-ratio:1; object-fit:contain; border-radius:8px; background:#fff;}
.gn-3d figcaption{font-family:var(--ui); font-size:12px; line-height:1.45; color:var(--sec); margin-top:7px;}
.gn-credit{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:4px; font-size:11px; color:var(--mut);}
.gn-flip{display:inline-flex; align-items:center; gap:4px;}
.dpage .gn-flip button{font-size:15px; line-height:1; padding:0 5px; color:var(--accent-dk);}
.gn-figure{margin-top:24px;}
.gn-figure-head{font-family:var(--ui); font-size:13px; font-weight:600; color:var(--ink); margin-bottom:8px;}
.gn-figure svg{display:block; width:100%; height:auto; overflow:visible; font-family:var(--ui);}
.gn-utr{fill:var(--line2); background:var(--line2);}
.gn-cds{fill:var(--mut); background:var(--mut);}
.gn-line, .gn-stem{stroke:var(--line2); stroke-width:1;}
.gn-k-pathogenic{fill:var(--gn-p); background:var(--gn-p);}
.gn-k-pathogenic_or_likely{fill:var(--gn-pl); background:var(--gn-pl);}
.gn-k-likely_pathogenic{fill:var(--gn-l); background:var(--gn-l);}
.gn-f0{fill:var(--line2); background:var(--line2);}
.gn-f1{fill:var(--gn-f1); background:var(--gn-f1);}
.gn-f2{fill:var(--gn-f2); background:var(--gn-f2);}
.gn-f3{fill:var(--gn-f3); background:var(--gn-f3);}
.gn-dot{fill-opacity:.85; stroke:var(--bg); stroke-width:1;}
.gn-axis{fill:var(--mut); font-size:10.5px;}
.gn-hit{fill:transparent; cursor:pointer;}
.gn-spot{cursor:pointer;}
.gn-pick{fill:var(--accent); pointer-events:none;}
.gn-legend{display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:8px; font-family:var(--ui); font-size:11.5px; color:var(--sec);}
.gn-legend span{display:inline-flex; align-items:center; gap:5px;}
.gn-legend i{display:inline-block; width:10px; height:10px; border-radius:2px;}
.gn-legend i.gn-round{border-radius:50%;}
.gn-exon{margin-top:12px; font-family:var(--ui);}
.gn-exon-head{font-size:12.5px; color:var(--sec); margin-bottom:6px;}
.gn-rows{max-height:186px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin;}
.gn-row{display:grid; grid-template-columns:8px 92px minmax(0,1fr) minmax(0,1.2fr) auto auto; gap:10px; align-items:center;
  padding:3px 0; font-size:12.5px; color:var(--ink);}
.gn-row i{width:8px; height:8px; border-radius:50%;}
.gn-at{color:var(--sec); font-variant-numeric:tabular-nums;}
.gn-stars{color:var(--gn-l); letter-spacing:1px;}
.gn-row a, .gn-more, .gn-about a{color:var(--accent-dk); text-decoration:none;}
.gn-row a:hover, .gn-more:hover, .gn-about a:hover{text-decoration:underline;}
.gn-more{display:inline-block; margin-top:14px; font-family:var(--ui); font-size:14px; font-weight:500;}
@container (max-width:640px){
  .gn-top{grid-template-columns:1fr;}
  .gn-facts{grid-template-columns:1fr; gap:2px;}
  .gn-facts dd{margin-bottom:8px;}
  .gn-row{grid-template-columns:8px minmax(0,1fr) minmax(0,1fr) auto;}
  .gn-at, .gn-stars{display:none;}
}
