/* An HP resource link opens Air2Protein's own viewer. No inline demo panel. */
.hp-page .hp-resource-record .hp-atlas-link{display:inline-flex;align-items:baseline;gap:9px;color:var(--hp-rose,#a34363);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:5px}
html:has(body.space-atlas-open),body.space-atlas-open{overflow:hidden!important}
body.hp-page .space-atlas-dialog{--atlas-ink:#172c39;--atlas-rose:#a34363;position:fixed;inset:0;width:min(1180px,calc(100vw - 48px));height:min(780px,calc(100dvh - 72px));max-width:none;max-height:calc(100dvh - 40px);margin:auto;padding:0;overflow:hidden;border:1px solid #d9c8d1;border-top:4px solid var(--atlas-rose);border-radius:6px 6px 14px 14px;color:var(--atlas-ink);background:#fff;box-shadow:0 30px 100px #15243245;color-scheme:light;font:400 14px/1.5 'Segoe UI',Arial,sans-serif}
.space-atlas-dialog[open]{display:flex;flex-direction:column;animation:space-atlas-arrive .24s cubic-bezier(.2,.7,.3,1) both}
.space-atlas-dialog::backdrop{background:#182635b8;backdrop-filter:blur(5px)}
.space-atlas-header{display:flex;align-items:center;justify-content:space-between;gap:20px;flex:none;padding:22px 28px 16px;background:linear-gradient(120deg,#fff,#fbf3f7)}
.hp-page .space-atlas-kicker{margin:0 0 5px;color:var(--atlas-rose);font:650 10px/1.6 'Segoe UI',Arial,sans-serif;letter-spacing:.12em;text-transform:uppercase}
.hp-page .space-atlas-header h2{margin:0;color:var(--atlas-ink);font:600 clamp(26px,3vw,36px)/1.05 'HP Cormorant',Georgia,serif;letter-spacing:-.015em}
.space-atlas-close{display:grid;place-items:center;flex:none;width:40px;height:40px;padding:0;border:1px solid #d9c8d1;border-radius:50%;color:var(--atlas-rose);background:#fff;cursor:pointer;font:300 27px/1 'Segoe UI',Arial,sans-serif}
.space-atlas-close:hover{background:#f6eaf0}
.space-atlas-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:0 28px 16px;border-bottom:1px solid #e9e0e6;background:#fff}
.space-atlas-views{display:inline-flex;gap:3px;padding:3px;border-radius:5px;background:#f3eaf0}
.space-atlas-dialog .space-atlas-views button{padding:7px 13px;border:0;border-radius:3px;color:#704f61;background:transparent;cursor:pointer;font:600 12px/1.5 'Segoe UI',Arial,sans-serif}
.space-atlas-dialog .space-atlas-views button[aria-pressed="true"]{color:#fff;background:var(--atlas-rose);box-shadow:0 2px 4px #7d3c551a}
.space-atlas-tools{display:flex;align-items:center;gap:15px;flex-wrap:wrap}
.space-atlas-dialog .space-atlas-tools :is(button,a){padding:5px 0;border:0;color:#6f4f62;background:transparent;cursor:pointer;text-decoration:none;font:600 12px/1.5 'Segoe UI',Arial,sans-serif}
.space-atlas-tools :is(button,a):hover{text-decoration:underline;text-underline-offset:4px}
.space-atlas-dialog .space-atlas-tools button:disabled{opacity:.4;cursor:default;text-decoration:none}
.space-atlas-canvas{position:relative;flex:1;min-height:0;background:#fbf9fb}
.space-atlas-canvas iframe{display:block;width:100%;height:100%;border:0;background:#fbf9fb}
.space-atlas-footer{display:flex;justify-content:space-between;gap:8px 24px;flex-wrap:wrap;flex:none;padding:11px 28px;border-top:1px solid #e9e0e6;background:#fbf8fa}
.hp-page .space-atlas-footer p{margin:0;color:#6e6270;font:400 11px/1.5 'Segoe UI',Arial,sans-serif}
.space-atlas-dialog :is(a,button,iframe):focus-visible,.hp-atlas-link:focus-visible{outline:2px solid #a34363;outline-offset:3px}
body.hp-page .space-atlas-dialog:fullscreen{width:100%;height:100%;max-height:none;border-radius:0}
@keyframes space-atlas-arrive{from{opacity:0;transform:translateY(10px) scale(.99)}to{opacity:1;transform:none}}
@media(max-width:700px){body.hp-page .space-atlas-dialog{width:calc(100vw - 20px);height:calc(100dvh - 32px);max-height:calc(100dvh - 24px)}.space-atlas-header{padding:16px 16px 14px}.space-atlas-toolbar{padding:0 16px 12px;gap:10px}.space-atlas-tools{gap:14px}.space-atlas-footer{padding:10px 16px}.space-atlas-header h2{font-size:28px}.space-atlas-close{width:36px;height:36px}}
@media(prefers-reduced-motion:reduce){.space-atlas-dialog[open]{animation:none}}
@media print{.space-atlas-dialog{display:none!important}}

/* Resource headings occupy the available dialog width, outside article measures. */
body.hp-page.hp-hybrid .space-atlas-header > div { min-width:0; flex:1; }
body.hp-page.hp-hybrid .space-atlas-header h2 {
  width:auto; min-width:0; max-width:none; font-family:var(--serif,"Source Serif 4",Georgia,serif); font-size:24px; line-height:1.3;
}
body.hp-page.hp-hybrid .space-atlas-loading {
  position:absolute; inset:0; z-index:1; display:grid; place-items:center;
  padding:28px; background:#f5f8f7; color:#293e4a; text-align:center;
  font-size:16px; line-height:1.6;
}
body.hp-page.hp-hybrid .space-atlas-loading[hidden] { display:none; }
body.hp-page.hp-hybrid .space-atlas-dialog.is-atlas-loading iframe { visibility:hidden; }
