.mg-gallery {
  --mg-ink:#182436;
  --mg-mute:#4f5866;
  --mg-rule:#c7cbd2;
  --mg-serif:Georgia,"Yu Mincho","Hiragino Mincho ProN","Noto Serif CJK JP",serif;
  background:#fff;
  color:var(--mg-ink);
  padding-block:clamp(3.2rem,6vw,6rem);
  scroll-margin-top:var(--masthead,80px);
}
.mg-heading {
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(16rem,.68fr);
  gap:clamp(1.5rem,5vw,5rem);
  align-items:end;
  margin-bottom:clamp(1.75rem,3vw,3.4rem);
}
.mg-heading h2 {font:500 clamp(2rem,3.7vw,4.1rem)/1.22 var(--mg-serif);letter-spacing:-.055em;text-wrap:balance}
.mg-heading p {font-size:1rem;line-height:1.72;color:var(--mg-mute);margin:0}
.mg-browser {display:grid;grid-template-columns:minmax(14rem,.41fr) minmax(0,1fr);gap:clamp(1.2rem,4.5vw,5rem);align-items:start}
.mg-options,.mg-source {border:0;padding:0;margin:0;min-width:0}
.mg-options legend,.mg-legend {font-size:.82rem;line-height:1.5;font-weight:600;color:var(--mg-mute)}
.mg-options legend {padding:0 0 .5rem}
.mg-option {display:block;position:relative;border-top:1px solid var(--mg-rule);cursor:pointer}
.mg-option:last-child {border-bottom:1px solid var(--mg-rule)}
.mg-option input {
  position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;
  padding:0;margin:0;border:0;white-space:nowrap;
}
.mg-choice {display:block;position:relative;padding:.58rem .6rem .68rem 1.5rem;}
.mg-choice strong {display:block;font-size:1.03rem;line-height:1.45;font-weight:550}
.mg-choice small {display:block;margin-top:.12rem;color:var(--mg-mute);font-size:.83rem;line-height:1.4}
.mg-choice::before {
  content:"";position:absolute;left:.15rem;top:1.05rem;width:.52rem;height:.52rem;
  box-sizing:border-box;border:1px solid #78808c;border-radius:50%;
}
.mg-option input:checked+.mg-choice::before {background:var(--mg-ink);border-color:var(--mg-ink)}
.mg-option input:checked+.mg-choice strong {font-weight:700}
.mg-option:hover .mg-choice {background:#f2f4f6}
.mg-option input:focus-visible+.mg-choice {outline:3px solid #1675b7;outline-offset:0}
.mg-panels {min-width:0;border-top:1px solid var(--mg-ink)}
.mg-panel {padding-top:clamp(1.5rem,2.7vw,3rem)}
.mg-panel h3 {font:500 clamp(1.65rem,2.6vw,3rem)/1.25 var(--mg-serif);letter-spacing:-.045em;text-wrap:balance}
.mg-panel>p {margin:.78rem 0 0;color:var(--mg-mute);line-height:1.7;max-width:44em}
.mg-diagram {margin-top:clamp(1.6rem,2.7vw,2.8rem)}
.mg-route,.mg-legend {display:grid;grid-template-columns:1fr 1fr;column-gap:clamp(1.1rem,3vw,3.5rem)}
.mg-legend {border-bottom:1px solid var(--mg-rule);padding-bottom:.58rem}
.mg-route {align-items:center;padding:1.25rem 0;border-bottom:1px solid var(--mg-rule)}
.mg-source dt {font:500 clamp(1.65rem,3.4vw,3.6rem)/1 var(--mg-serif);letter-spacing:-.06em}
.mg-source dd {font-size:.91rem;line-height:1.5;color:var(--mg-mute);margin-top:.48rem}
.mg-outputs {min-width:0;list-style:none;margin:0;padding:0}
.mg-outputs li {position:relative;font-size:1rem;line-height:1.5;padding:.28rem 0 .28rem 1.25rem;color:var(--mg-ink)}
.mg-outputs li::before,.mg-outputs li::after {content:"";position:absolute;left:0}
.mg-outputs li::before {top:0;bottom:0;border-left:1px solid #9098a5}
.mg-outputs li:first-child::before {top:50%}
.mg-outputs li:last-child::before {bottom:50%}
.mg-outputs li::after {width:.8rem;top:50%;border-top:1px solid #9098a5}
@supports selector(:has(*)) {
  .mg-panel {display:none}
  .mg-browser:has([value="properties"]:checked) #mg-panel-properties,
  .mg-browser:has([value="rna"]:checked) #mg-panel-rna,
  .mg-browser:has([value="binding"]:checked) #mg-panel-binding,
  .mg-browser:has([value="dynamics"]:checked) #mg-panel-dynamics,
  .mg-browser:has([value="expression"]:checked) #mg-panel-expression,
  .mg-browser:has([value="training"]:checked) #mg-panel-training {display:block}
}
@supports not selector(:has(*)) {
  .mg-browser {grid-template-columns:1fr}
  .mg-options {display:none}
  .mg-panel+.mg-panel {margin-top:2rem}
}
@media (max-width:800px) {
  .mg-heading {grid-template-columns:1fr;gap:.65rem}
  .mg-heading p {max-width:43em}
  .mg-browser {grid-template-columns:1fr;gap:1.4rem}
  .mg-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:.85rem}
  .mg-option:nth-last-child(-n+3) {border-bottom:1px solid var(--mg-rule)}
  .mg-panels {border:0}
  .mg-panel {padding:0}
}
@media (max-width:560px) {
  .mg-gallery {padding-block:2.8rem}
  .mg-heading {margin-bottom:1.25rem}
  .mg-options {grid-template-columns:repeat(2,minmax(0,1fr));gap:0 .7rem}
  .mg-option:nth-last-child(3) {border-bottom:0}
  .mg-choice {padding:.6rem .1rem .65rem 1rem}
  .mg-choice::before {left:0;top:1.02rem;width:.43rem;height:.43rem}
  .mg-choice strong {font-size:.94rem}
  .mg-choice small {font-size:.78rem}
  .mg-panel>p {font-size:.95rem}
  .mg-route,.mg-legend {grid-template-columns:minmax(0,.91fr) minmax(0,1.09fr);column-gap:.7rem}
  .mg-source dt {font-size:clamp(1.45rem,6.7vw,2.1rem)}
  .mg-source dd,.mg-outputs li {font-size:.9rem}
  .mg-outputs li {padding-left:.8rem}.mg-outputs li::after {width:.5rem}
  .mg-diagram {margin-top:1.15rem}
}
@media (forced-colors:active) {
  .mg-option input:checked+.mg-choice::before {background:Highlight;border-color:Highlight;forced-color-adjust:none}
}
.mg-admet {margin:1rem 0 0}
.mg-admet figcaption {font-size:.82rem;line-height:1.5;font-weight:600;color:var(--mg-mute)}
.mg-admet ul {display:flex;gap:clamp(.4rem,1.1vw,1rem);list-style:none;margin:.5rem 0 0;padding:0}
.mg-admet li {flex:var(--tasks) 1 2.25rem;min-width:0;color:var(--mg-mute);font-size:.8rem;line-height:1.5}
.mg-admet b {font-weight:600;color:var(--mg-ink)}
.mg-segments {display:grid;grid-template-columns:repeat(var(--tasks),1fr);gap:2px;margin:0 0 .22rem}
.mg-segments i {height:.8rem;background:#525f72}
.mg-admet li:nth-child(even) .mg-segments i {background:#8d95a1}
@media(max-width:560px) {
 .mg-admet ul {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem .85rem}
 .mg-segments {display:flex;gap:2px}
 .mg-segments i {height:.65rem;width:3px;max-width:4%}
}
.mg-heading h2 span {display:inline-block}
