connection-atlas { display:block; min-width:0; }
connection-atlas[data-ready] {
  color:#ecece8; border:1px solid #707670; background:#f9faf7; overflow:hidden; border-radius:.75rem;
}
#viewer #connection-plan:has(connection-atlas) { border:0; background:transparent; }
connection-atlas .atlas-stage, connection-atlas .atlas-map { position:relative; }
connection-atlas [hidden] { display:none !important; }
connection-atlas .atlas-map img, connection-atlas .atlas-detail img {
  display:block; width:100%; height:auto; margin:0; background:#fff;
}
connection-atlas[data-view="detail"] .atlas-stage {
  display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  align-items:center; gap:2px; background:#c5d0c9;
}
connection-atlas .atlas-map, connection-atlas .atlas-detail { min-width:0; background:white; }
connection-atlas[data-view="detail"] .atlas-stage .atlas-plate {
  top:.35rem; left:auto; right:.35rem; bottom:auto;
}
@media (max-width:600px) {
  connection-atlas[data-view="detail"] .atlas-stage { grid-template-columns:1fr; }
  connection-atlas[data-view="detail"] .atlas-detail img { max-height:13rem; object-fit:contain; }
  connection-atlas[data-ready] .atlas-bar { flex-wrap:wrap; }
}
connection-atlas .atlas-map svg, connection-atlas .atlas-pins { position:absolute; inset:0; width:100%; height:100%; }
connection-atlas .atlas-map polygon { fill:#efa72d; fill-opacity:.15; stroke:transparent; }
connection-atlas .atlas-map polygon.selected { fill-opacity:.67; stroke:#754215; stroke-width:4px; }
connection-atlas .atlas-plate {
  position:absolute; top:.45rem; right:.45rem; pointer-events:none; padding:.28rem .48rem;
  border-radius:.3rem; background:#243833; color:#fff; font:600 clamp(.75rem,1vw,.875rem)/1.12 Outfit,sans-serif;
}
connection-atlas[data-view="detail"] .atlas-plate { inset:auto .45rem .45rem auto; }
connection-atlas .atlas-pins { pointer-events:none; }
connection-atlas .atlas-pins button, #viewer connection-atlas .atlas-pins button {
  display:grid; place-items:center; position:absolute; transform:translate(-50%,-50%);
  width:44px; height:44px; min-width:44px; min-height:44px; border:0; margin:0; padding:0;
  border-radius:50%; background:transparent; box-shadow:none; cursor:pointer; pointer-events:auto;
}
connection-atlas .atlas-pins button span {
  position:absolute; top:-1px; right:-1px; display:grid; place-items:center; width:1.28rem; height:1.28rem;
  border:1px solid white; border-radius:50%; background:#28463f; color:white;
  box-shadow:0 1px 3px #0005; font:600 .82rem/1 Outfit,sans-serif;
}
connection-atlas .atlas-pins button[aria-pressed=true] span { background:#6e3b0e; }
connection-atlas[data-ready] .atlas-pins button[data-atlas-position] { background:transparent; }
connection-atlas .atlas-bar {
  display:flex; align-items:stretch; justify-content:space-between; gap:.25rem;
  padding:0 .48rem; border-top:1px solid #cacdc4; background:#20312e;
}
connection-atlas .atlas-bar > div { display:flex; gap:.2rem; }
connection-atlas .atlas-bar button, #viewer connection-atlas .atlas-bar button,
connection-atlas .atlas-bar a {
  display:inline-flex; justify-content:center; align-items:center; min-height:44px; margin:0;
  border:0; padding:0 .6rem; border-radius:0; background:transparent; color:#fff; box-shadow:none;
  font:500 clamp(.875rem,1.2vw,1rem)/1.2 Outfit,sans-serif; cursor:pointer; text-decoration:none;
}
connection-atlas[data-ready] .atlas-bar button[aria-pressed=true] { color:#ffe7af; background:#33433d; box-shadow:inset 0 -3px #edca83; }
#viewer connection-atlas .atlas-bar button[aria-pressed=true] { color:#ffe7af; box-shadow:inset 0 -3px #edca83; }
connection-atlas .atlas-bar a { text-decoration:underline; text-underline-offset:.22em; }
connection-atlas .atlas-bar :is(button,a):hover { background:#374a46; }
connection-atlas :is(button,a):focus-visible { outline:3px solid #d58d24; outline-offset:-3px; }
connection-atlas .atlas-reader {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
connection-atlas .atlas-steel-reading {
  margin:0; padding:0; background:#f4f6f2; color:#20312e; border:0; border-top:1px solid #b0bdb4;
}
connection-atlas .atlas-steel-reading > summary {
  margin:0; min-height:44px; padding:.65rem .8rem; cursor:pointer; color:inherit;
  font-family:inherit; font-size:.94rem; font-weight:600; line-height:1.4;
}
connection-atlas .atlas-steel-reading > summary:focus-visible { outline:3px solid #8a5a17; outline-offset:-3px; }
connection-atlas .atlas-steel-body { padding:0 .8rem .8rem; }
connection-atlas .atlas-steel-body > p { color:inherit; font-size:.93rem; line-height:1.45; margin:0 0 .6rem; }
connection-atlas .atlas-steel-body figure {
  display:grid; grid-template-columns:minmax(4.2rem,5.7rem) minmax(0,1fr); align-items:center;
  gap:.7rem; margin:0; padding:.65rem 0; border-top:1px solid #c6d0c8;
}
connection-atlas .atlas-steel-body figure svg { display:block; width:100%; height:auto; background:white; border:1px solid #d0d6cc; }
connection-atlas .atlas-steel-body figcaption {
  display:grid; gap:.15rem; padding:0; color:inherit; text-align:start; font-size:.9rem; line-height:1.4;
}
connection-atlas .atlas-steel-body bdi { justify-self:start; color:#2b5146; font:600 .94rem/1.4 ui-monospace,monospace; }
@media(max-width:360px) {
  connection-atlas .atlas-bar { padding-inline:.25rem; }
  connection-atlas .atlas-bar button, #viewer connection-atlas .atlas-bar button, connection-atlas .atlas-bar a { padding-inline:.45rem; }
}
.atlas-study {
  margin:1.5rem 0; border:1px solid var(--line,#6f8078); border-radius:.8rem; background:var(--surface,#23312e);
}
.atlas-study > summary { padding:.8rem 1rem; font-weight:600; cursor:pointer; }
connection-study { display:block; padding:0 1rem 1rem; }
connection-study .study-nav,connection-study .study-action,connection-study .study-footer,connection-study .reading-buttons {
  display:flex; flex-wrap:wrap; align-items:center; gap:.45rem;
}
connection-study .study-nav { justify-content:space-between; border-block:1px solid var(--line,#6f8078); padding:.7rem 0; }
connection-study :is(button,select) {
  min-height:44px; border:1px solid var(--line,#6f8078); border-radius:.5rem; padding:.48rem .65rem;
  background:var(--surface,#23312e); color:var(--ink,#f2f1e9); font:500 .95rem/1.25 Outfit,sans-serif; cursor:pointer;
}
connection-study select{max-width:100%;min-width:0;}
connection-study button:disabled { opacity:.48; cursor:default; }
connection-study button[aria-pressed=true] { background:#f4d59b; color:#29291d; }
connection-study label { display:flex; flex-direction:column; gap:.2rem; font-size:.86rem; font-weight:600; }
connection-study .study-content { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(12rem,1fr); align-items:center; gap:1.25rem; margin:1rem 0; }
connection-study :is(.reading-plate,.reading-pair svg) { display:block; width:100%; height:auto; background:#fff; border-radius:.4rem; }
connection-study .study-input { display:flex; gap:.5rem; flex-wrap:wrap; }
connection-study .study-text { margin:.8rem 0; line-height:1.5; }
connection-study .study-footer { border-top:1px solid var(--line,#6f8078); padding-top:.8rem; }
.reading-finger,.reading-discovery.picked { fill:#eaae42; fill-opacity:.58; stroke:#715021; stroke-width:3; }
.reading-route,.ink-sample path { fill:none;stroke:#086b64;stroke-width:5;stroke-linecap:round;stroke-linejoin:round; }
.reading-dot {fill:#17685d;stroke:#fff;stroke-width:4;}
@media(prefers-reduced-motion:no-preference){
  .reading-route.entering {stroke-dasharray:1;animation:reading-draw .24s ease-out;}
  @keyframes reading-draw {from {stroke-dashoffset:1;} to {stroke-dashoffset:0;}}
}
.reading-pair {display:grid;grid-template-columns:1fr 1fr;gap:.6rem;}
.reading-pair figure {margin:0;min-width:0;}
.reading-pair figcaption {font-size:.9rem;margin:.35rem 0;}
.reading-discovery-map {position:relative;}
.reading-discovery {fill:none;}
.reading-discovery-map + .reading-pair {margin-top:.8rem;}
.reading-pins {position:absolute;inset:0;pointer-events:none;}
.atlas-study .reading-pins button {position:absolute;translate:-50% -50%;pointer-events:auto;display:grid;place-items:center;min-width:44px;width:44px;height:44px;border:0;background:none;color:white;box-shadow:none;padding:0;}
.reading-pins span {width:1.45rem;height:1.45rem;background:#244c46;border:1px solid #fff;border-radius:50%;display:grid;place-items:center;font-weight:650;}
.reading-pins [aria-pressed=true] span {background:#794411;}
.ink-icon {display:inline-block;width:1.1rem;height:.65rem;margin-inline-end:.4rem;vertical-align:middle;}
.ink-0 {border-top:2px solid currentColor;}
.ink-1 {background:repeating-linear-gradient(-45deg,transparent 0 2px,currentColor 2px 3px);}
.ink-2 {border-inline:1px solid currentColor;background:linear-gradient(currentColor,currentColor) center/100% 1px no-repeat;}
connection-study :is(a,button,select):focus-visible {outline:3px solid #c18437;outline-offset:1px;}
@media(max-width:680px){
  connection-study .study-content {grid-template-columns:1fr;gap:.7rem;}
  .reading-pair {grid-template-columns:1fr;}
  .reading-pair svg {max-height:185px;}
  connection-study .study-nav,connection-study .study-input {align-items:stretch;}
}
