/* AIM Platform prototype - site page (Phase 2).
   The model fills the window. The site menu is a rail of icon buttons floating over the left
   of the model, styled exactly like the AIM viewer's own tool rail on the right (same glass,
   button size, highlight and hover labels). A globe at the top goes back to Portfolio.
   Sections open as a panel beside the rail. */

body.site-mode .topbar { display: none; }
body.site-mode .workspace { inset: 0; }
body.site-mode .placeholder { overflow: hidden; background: var(--deep); }

.site-page { position: absolute; inset: 0; --fx: 12px; --rail: 46px; --tb: 36px; }

/* ---------- Floating menu (matches the viewer's #toolbar / .tb) ---------- */
.site-float {
  position: absolute; z-index: 30; top: var(--fx); left: var(--fx); bottom: var(--fx);
  display: flex; align-items: flex-start; gap: 8px; pointer-events: none; max-width: calc(100% - 2 * var(--fx));
}
.site-float > * { pointer-events: auto; }
.site-rail {
  position: relative; z-index: 2; flex: none; display: flex; flex-direction: column; gap: 3px; padding: 4px;
  background: rgba(8, 12, 16, .78); border: 1px solid rgba(99, 199, 255, .18); border-radius: 9px;
}
.sr-group { display: contents; }
.tb {
  width: var(--tb); height: var(--tb); display: flex; align-items: center; justify-content: center; border-radius: 6px;
  color: #cfe7f5; position: relative; background: none;
}
.tb svg { width: 19px; height: 19px; }
.tb:hover { background: rgba(99, 199, 255, .16); }
.tb[aria-pressed="true"], .tb.active { background: var(--accent); color: var(--navy); }
#shMore[aria-expanded="true"] { background: rgba(99, 199, 255, .16); }
.tb::after {
  content: attr(data-label); position: absolute; left: calc(var(--tb) + 10px); top: 50%; transform: translateY(-50%);
  background: rgba(4, 58, 87, .95); color: #fff; padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 500; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.tb:hover::after { opacity: 1; }
.site-float:has(.site-panel:not([hidden])) .tb::after { display: none; }
.tb-sep { height: 2px; background: rgba(99, 199, 255, .45); margin: 5px 3px; border-radius: 1px; }
.site-rail :focus-visible { outline-color: var(--accent); }
/* Folding menu (AIM viewer): globe, search, then a small arrow that opens the rest */
.sr-menu { display: contents; }
.sr-toggle { height: 16px; margin: 2px 0; }
.sr-toggle svg { width: 16px; height: 16px; transition: transform .18s ease; color: rgba(207, 231, 245, .8); }
.sr-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.sr-toggle:hover svg { color: #fff; }
.site-rail.collapsed .sr-menu { display: none; }
.site-rail:not(.collapsed) .sr-menu > * { animation: srIn .16s ease-out; }
@keyframes srIn { from { opacity: 0; transform: translateY(-6px); } }
.site-page:not(.rail-fold) .sr-toggle { display: none; }
.rail-fold .sr-sep { display: none; }
.sr-catch { position: absolute; inset: 0; z-index: 29; display: none; }
.site-page.peeking .sr-catch { display: block; }
@media (hover: none) { .sr-toggle { height: 26px; } }
@media (hover: none) {
  .tb::after { display: none; }
  .site-page { --tb: 42px; --rail: 52px; }
  .tb svg { width: 20px; height: 20px; }
}
.sh-seg { display: inline-flex; border: 1px solid rgba(99, 199, 255, .35); border-radius: var(--r-ctrl); padding: 2px; gap: 2px; }
.sh-seg button { height: 26px; padding: 0 10px; border-radius: 4px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .8); }
.sh-seg button[aria-selected="true"] { background: var(--accent); color: var(--navy); }

/* ---------- Stage: the model fills the window ---------- */
.site-stage { position: absolute; inset: 0; background: #111218; overflow: hidden; }
.viewer-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #111218; }
.stage-note {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  background: rgba(33, 34, 43, .78); color: rgba(255, 255, 255, .86); font-size: 11.5px; font-weight: 500; padding: 5px 10px; border-radius: 6px; pointer-events: none;
}

/* No digital model yet */
.nm-hero { position: absolute; inset: 0; }
.nm-hero img, .nm-hero .placeholder-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2, 29, 44, .05) 40%, rgba(2, 29, 44, .55)); pointer-events: none; }
.nm-hero .src-tag { position: absolute; z-index: 2; right: 14px; top: 14px; left: auto; bottom: auto; }
.nm-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.nm-steps li { font-size: 11px; color: var(--ink-3); display: grid; gap: 6px; line-height: 1.25; }
.nm-steps li span { height: 4px; border-radius: 2px; background: var(--surface-3); }
.nm-steps li.done span { background: var(--navy); }
.nm-steps li.done { color: var(--ink-2); }
.nm-steps li.now span { background: var(--accent); box-shadow: 0 0 0 2px rgba(99, 199, 255, .3); }
.nm-steps li.now { color: var(--navy); font-weight: 600; }
.nm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

.nm-map { position: absolute !important; inset: 0; }
.nm-map.ready { background: #111218; }
.site-stage:has(.nm-map.ready) .nm-hero { display: none; }
/* Notice: model not present (viewer pop-out style) */
.nm-note {
  --ink: #eaf3fb; --ink-2: rgba(234, 243, 251, .8); --ink-3: rgba(234, 243, 251, .6); --surface-3: rgba(255, 255, 255, .14); --navy: #9fdcff;
  position: absolute; z-index: 4; top: 12px; left: 50%; transform: translateX(-50%); width: min(540px, calc(100% - 160px));
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 10px 14px 14px; color: var(--ink);
  background: rgba(4, 58, 87, .94); backdrop-filter: blur(8px); border: 1px solid rgba(99, 199, 255, .25); border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35); animation: nm-in .24s cubic-bezier(.22, 1, .36, 1);
}
@keyframes nm-in { from { transform: translate(-50%, -12px); opacity: 0; } }
.nm-ico { flex: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: rgba(99, 199, 255, .14); color: var(--accent); }
.nm-text { flex: 1; min-width: 0; display: grid; gap: 6px; }
.nm-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9fdcff; }
.nm-title { font-size: 15px; color: #fff; }
.nm-text p { margin: 0; font-size: 13px; color: var(--ink-2); }
/* With a section panel open, the notice moves to the right of it */
.site-page.panel-open .nm-note { left: calc(var(--fx) + var(--rail) + 360px); right: 60px; width: auto; max-width: 540px; transform: none; animation: none; }
.nm-x { flex: none; width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: #cfe8ff; }
.nm-x:hover { background: #16324a; }
.nm-note.min { width: auto; align-items: center; padding: 6px 6px 6px 8px; }
.nm-note.min .nm-ico { width: 28px; height: 28px; }
.nm-note.min .nm-text p, .nm-note.min .nm-steps, .nm-note.min .nm-actions, .nm-note.min .nm-eyebrow { display: none; }
.nm-note.min .nm-title { font-size: 13px; white-space: nowrap; }
.nm-note .nm-steps li.done span { background: #9fdcff; }
.nm-note .nm-steps li.now { color: #fff; }
.nm-note .btn { background: #16324a; border-color: transparent; color: #cfe8ff; border-radius: 8px; flex: none; }
.nm-note .btn:hover { background: #1b4566; }
.nm-note .btn.primary { background: #63C7FF; border-color: #63C7FF; color: #03263a; }
.nm-note .btn.primary:hover { background: #8fd7ff; }
.nm-or { align-self: center; font-size: 12px; color: var(--ink-3); padding: 0 2px; }
/* Map controls on the site map: the same buttons, in the same place, as on the Portfolio map */
.nm-ctrls { position: absolute; z-index: 3; right: 12px; bottom: 36px; display: flex; flex-direction: column; gap: 8px; }
.nm-ctrls .ctrl-group button.on { color: var(--navy); background: var(--navy-050); }
.nm-ctrls .style-dot { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid rgba(4, 58, 87, .35); display: block; }
.nm-ctrls [data-style="light"] .style-dot { background: linear-gradient(135deg, #f3f1ec 0 45%, #cfe3ee 45%); }
.nm-ctrls [data-style="dark"] .style-dot { background: linear-gradient(135deg, #1c2633 0 45%, #33465a 45%); }
.nm-ctrls [data-style="satellite"] .style-dot { background: radial-gradient(circle at 30% 30%, #6d7f4e, #3f4f31 45%, #59623e 70%, #2d3a2a); }
.nm-link { align-self: center; font-size: 13px; font-weight: 600; color: #9fdcff; text-decoration: underline; text-underline-offset: 3px; padding: 4px 2px; }
.nm-link:hover { color: #fff; }
/* Loading: the AIM viewer's own loader (#aimLoadBig), so the hand-over to the viewer does not jump */
.st-load {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle at 50% 50%, #17222d 0, #0b1117 70%); transition: opacity .35s; pointer-events: none;
}
.st-load[data-kind="ivion"] { background: radial-gradient(circle at 50% 50%, #26282e 0, #17181c 70%); }
.st-load.done { opacity: 0; }
.st-load svg { width: 136px; height: 136px; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .5)); }
.st-load .arc { transform-origin: 60px 60px; animation: sl-spin 1.1s linear infinite; }
@keyframes sl-spin { to { transform: rotate(360deg); } }
.st-load .t { color: #fff; font-size: 15px; font-weight: 600; text-align: center; }
.st-load .s { max-width: 320px; min-height: 1.3em; color: rgba(234, 243, 251, .8); font-size: 12.5px; text-align: center; opacity: 0; transition: opacity .4s; }
.st-load .s.on { opacity: 1; }
.sl-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9fdcff; }
.site-stage:has(.st-load:not(.done)) :is(.nm-note, .nm-ctrls, .stage-note) { visibility: hidden; }
.cap-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
.cap-steps b { color: var(--ink); }

/* IVION, nothing connected */
.ivion-empty {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 90px 80px 24px 90px;
  background: radial-gradient(800px 400px at 70% 10%, rgba(99, 199, 255, .10), transparent 60%), linear-gradient(180deg, #1a1b22, #111218);
}
.ie-card { max-width: 460px; color: #fff; display: grid; gap: 10px; justify-items: start; }
.ie-card .eyebrow { color: var(--accent); }
.ie-card h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.ie-card p { margin: 0; color: rgba(255, 255, 255, .76); }
.ie-card .small-note { color: rgba(255, 255, 255, .56); }
.ie-card code { background: rgba(255, 255, 255, .08); padding: 1px 5px; border-radius: 4px; }
.ie-card .sh-seg { margin: 2px 0 4px; }
/* Where IVION's own controls sit (measured on the live platform), as outlines */
.iw {
  position: absolute; display: grid; place-items: center; text-align: center; padding: 4px; font-size: 11px; line-height: 1.2;
  color: rgba(255, 255, 255, .62); border: 1.5px dashed rgba(99, 199, 255, .45); background: rgba(99, 199, 255, .05); border-radius: 8px;
}
.iw-top { top: 0; left: 0; right: 0; height: 64px; border-radius: 0; }
.iw-view { top: 80px; left: 50%; transform: translateX(-50%); width: 238px; height: 41px; }
.iw-tools { left: 16px; top: 50%; transform: translateY(-50%); width: 46px; height: 210px; }
.iw-tools span { writing-mode: vertical-rl; transform: rotate(180deg); }
.iw-floors { right: 10px; top: 50%; transform: translateY(-50%); width: 49px; height: 125px; }
.iw-map { right: 10px; bottom: 10px; width: 234px; height: 140px; }
.iw-date { left: 0; bottom: 10px; width: 96px; height: 26px; }
.ie-mark { width: 52px; height: 52px; border-radius: 12px; background: rgba(99, 199, 255, .12); color: var(--accent); display: grid; place-items: center; }

/* ---------- Section panel ---------- */
.site-panel {
  /* Matches the AIM viewer's pop-out panels (.sidePanel, #poiPanel): navy glass, thin blue border, blue highlights */
  --surface: transparent; --ink: #eaf3fb; --ink-2: rgba(234, 243, 251, .8); --ink-3: rgba(234, 243, 251, .6);
  --line: rgba(99, 199, 255, .18); --line-2: rgba(99, 199, 255, .32); --navy: #9fdcff; --accent-ink: #9fdcff;
  --surface-2: #16324a; --surface-3: #16324a; --navy-050: #1b4566;
  align-self: flex-start; max-height: 100%; width: 340px; max-width: calc(100vw - var(--rail) - 4 * var(--fx)); min-height: 0; overflow: hidden;
  background: rgba(4, 58, 87, .94); backdrop-filter: blur(8px); border: 1px solid rgba(99, 199, 255, .25); border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35); color: var(--ink); font-size: 13px;
  display: flex; flex-direction: column; animation: sp-in .24s cubic-bezier(.22, 1, .36, 1);
}
.site-panel[hidden] { display: none; }
@keyframes sp-in { from { transform: translateX(-40px); opacity: 0; } }
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--line); }
.sp-titles { min-width: 0; }
.sp-site { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-head h2 { margin: 0; font-size: 14px; font-weight: 700; color: #fff; }
.sp-body { flex: 1 1 auto; min-height: 0; grid-auto-rows: max-content; overflow: auto; scrollbar-width: thin; padding: 12px 14px 18px; display: grid; gap: 12px; align-content: start; }
.sp-image { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.sp-image img, .sp-image .placeholder-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sp-kv { display: grid; grid-template-columns: 110px 1fr; gap: 7px 12px; margin: 0; font-size: 13.5px; }
.sp-kv dt { color: var(--ink-3); }
.sp-kv dd { margin: 0; color: var(--ink); }
.sp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-wide { width: 100%; }
.btn.primary.sp-wide { flex: none; }
.sp-lead { margin: 0; color: var(--ink-2); }
.sp-h { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--navy); }
.sp-list { display: grid; gap: 8px; }
.sp-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-align: left; width: 100%; background: var(--surface); }
button.sp-row:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.sp-row .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sp-row b { font-weight: 600; color: var(--ink); }
.sp-row.visit.is-on { border-color: var(--accent); background: var(--navy-050); }
.sp-row .chips { display: flex; gap: 5px; flex-wrap: wrap; }
.sp-row-act { display: grid; gap: 6px; justify-items: end; flex: none; }
.on-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.link { color: var(--navy); font-weight: 600; font-size: 12.5px; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--bad); }
.sp-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 28px 16px; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 10px; }
.sp-empty b { color: var(--ink); }
.sp-map { height: 260px; border-radius: 10px; overflow: hidden; background: var(--surface-3); position: relative; }
.sp-coords { display: grid; gap: 2px; font-variant-numeric: tabular-nums; font-size: 13px; }
.sp-move { display: grid; gap: 10px; padding: 12px; border-radius: 10px; background: var(--navy-050); border: 1px solid rgba(99, 199, 255, .55); }
.sp-links { display: flex; gap: 16px; flex-wrap: wrap; }
.sp-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--navy); font-weight: 600; font-size: 13px; text-decoration: none; }
.sp-links a:hover { text-decoration: underline; }
.site-pin { width: 30px; height: 40px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 40'%3E%3Cpath d='M15 39s13-13.3 13-23.5C28 7.5 22.2 1.5 15 1.5S2 7.5 2 15.5C2 25.7 15 39 15 39z' fill='%23043A57' stroke='%23fff' stroke-width='2.5'/%3E%3Ccircle cx='15' cy='15.5' r='5' fill='%2363C7FF'/%3E%3C/svg%3E"); filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.site-pin.drag { cursor: grab; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.sp-cats .opt { gap: 6px; }
.clip { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--navy); background: var(--navy-050); border-radius: 999px; padding: 2px 7px; flex: none; }

/* Shared controls inside the panel, in the viewer's pop-out style */
.site-panel .icon-btn { color: #cfe8ff; }
.site-panel .icon-btn:hover { background: #16324a; color: #fff; }
.site-panel .btn { background: #16324a; border-color: transparent; color: #cfe8ff; border-radius: 8px; }
.site-panel .btn:hover { background: #1b4566; border-color: transparent; }
.site-panel .btn.primary { background: #63C7FF; border-color: #63C7FF; color: #03263a; }
.site-panel .btn.primary:hover { background: #8fd7ff; }
.site-panel .btn.ghost { background: transparent; border: 1px dashed rgba(99, 199, 255, .35); }
.site-panel .btn.danger, .site-panel .link.danger { color: #ff9b8f; }
.site-panel input, .site-panel select { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(99, 199, 255, .3); }
.site-panel input::placeholder { color: rgba(234, 243, 251, .5); }
.site-panel .tag { background: rgba(99, 199, 255, .12); color: #cfeeff; }
.site-panel .opt { background: transparent; color: #cfe8ff; border-color: rgba(99, 199, 255, .3); }
.site-panel .opt:hover { border-color: #63C7FF; }
.site-panel .opt[aria-pressed="true"] { background: #63C7FF; color: #03263a; border-color: #63C7FF; }
.site-panel .sp-row { background: rgba(255, 255, 255, .03); }
.site-panel button.sp-row:hover { background: #16324a; box-shadow: none; }
.site-panel .callout { background: #16324a; }
.site-panel .fb::before { border-color: transparent #0b3550 rgba(255, 255, 255, .35) transparent; }
.site-panel :focus-visible { outline-color: var(--accent); }

/* Files */
.fl-tools { display: flex; gap: 8px; }
.fl-tools input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--line-2); border-radius: var(--r-ctrl); padding: 0 12px; }
.fl-crumbs { font-size: 13px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.fl-crumbs button { color: var(--navy); font-weight: 600; }
.fl-crumbs b { color: var(--ink); }
.fl-drop { display: grid; gap: 2px; border-radius: 10px; min-height: 60px; }
.fl-drop.over { outline: 2px dashed var(--accent); outline-offset: 4px; background: var(--navy-050); }
.fl-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; text-align: left; width: 100%; }
.fl-row:hover { background: var(--surface-2); }
.fl-row .grow { flex: 1; min-width: 0; display: grid; gap: 1px; }
.fl-row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-row.folder > .ico:first-child { color: var(--navy); }
.lock { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
.fb { flex: none; width: 38px; height: 44px; border-radius: 5px; background: var(--c); color: #fff; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; display: grid; place-items: end center; padding-bottom: 6px; position: relative; }
.fb::before { content: ""; position: absolute; right: 0; top: 0; border-style: solid; border-width: 0 10px 10px 0; border-color: transparent var(--surface) rgba(255, 255, 255, .35) transparent; }

/* Document viewer */
.site-doc { position: absolute; z-index: 35; inset: 0; background: var(--surface-2); display: flex; flex-direction: column; animation: sp-in .15s ease-out; }
.doc-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.doc-bar .grow { flex: 1; min-width: 0; }
.doc-bar b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 300px; }
.doc-view { overflow: auto; padding: 24px; display: grid; place-items: start center; }
.doc-side { background: var(--surface); border-left: 1px solid var(--line); padding: 16px; display: grid; gap: 10px; align-content: start; overflow: auto; }
.doc-side h3 { margin: 0; font-size: 13px; color: var(--navy); }
.poi-link { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.poi-link .grow { flex: 1; min-width: 0; display: grid; }
.doc-frame { width: 100%; height: calc(100vh - 150px); border: 0; background: #fff; box-shadow: var(--shadow-2); }
.doc-img { max-width: 100%; box-shadow: var(--shadow-2); }
.doc-photo { position: relative; width: min(100%, 960px); aspect-ratio: 16 / 10; box-shadow: var(--shadow-2); background: var(--surface-3); }
.doc-photo img, .doc-photo .placeholder-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.doc-none { display: grid; justify-items: center; gap: 8px; text-align: center; max-width: 380px; margin-top: 60px; color: var(--ink-2); }
.doc-paper { width: min(100%, 720px); aspect-ratio: 1 / 1.414; background: #fff; box-shadow: var(--shadow-2); padding: 56px 60px; display: grid; gap: 10px; align-content: start; }
.dp-title { font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
.dp-sub { color: var(--ink-3); margin-bottom: 18px; border-bottom: 2px solid var(--navy); padding-bottom: 14px; }
.doc-paper i { display: block; height: 8px; border-radius: 4px; background: #e6ebef; }
.doc-paper p { margin: 0; }
.dp-h { margin-top: 14px; }
.dp-h i { height: 11px; background: #cfdae2; }
.dp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dp-table th { text-align: left; padding: 8px 6px; border-bottom: 2px solid var(--navy); color: var(--navy); }
.dp-table td { padding: 9px 6px; border-bottom: 1px solid var(--line); }
.dp-note { margin-top: auto; padding-top: 24px; font-size: 11.5px; color: var(--ink-3); }

/* ---------- Docked: beside IVION ----------
   Nothing can be laid over IVION, so the rail becomes a side menu with labels and a section
   opens as a panel that pushes the model across. Same buttons and panels as over the AIM viewer. */
.site-page.dock { --dock: 66px; --panel: 340px; }
.dock .site-float { top: 0; left: 0; bottom: 0; gap: 0; max-width: none; }
.dock .site-rail {
  height: 100%; width: var(--dock); align-items: center; padding: 8px 6px; border-radius: 0; border-width: 0 1px 0 0;
  background: #0b1117; backdrop-filter: none;
}
.dock .tb { width: 54px; height: auto; min-height: 50px; flex-direction: column; gap: 4px; padding: 7px 0 6px; }
.dock .tb::after {
  content: attr(data-short); position: static; transform: none; opacity: 1; background: none; padding: 0;
  font-size: 10px; font-weight: 600; line-height: 1.1; color: inherit; white-space: normal; text-align: center;
}
.dock .site-float:has(.site-panel:not([hidden])) .tb::after { display: block; }
.dock .tb-sep { width: 38px; align-self: center; }
.dock .site-panel {
  align-self: stretch; max-height: none; width: var(--panel); max-width: none; border-radius: 0; border-width: 0 1px 0 0; box-shadow: none; backdrop-filter: none;
  background: #06324c; animation: none;
}
.dock .site-stage { left: var(--dock); transition: left .2s ease; }
.dock.panel-open .site-stage { left: calc(var(--dock) + var(--panel)); }
.dock .nm-hero .src-tag { right: 14px; }

/* ---------- Phones and narrow windows ----------
   The viewer moves its own toolbar to the bottom centre on phones, so the site rail stays
   top left; sections open as a sheet from the bottom. */
@media (max-width: 820px) {
  .site-page { --fx: 8px; --tb: 42px; --rail: 52px; }
  .site-float { position: static; }
  .site-rail { position: absolute; z-index: 33; top: var(--fx); left: var(--fx); }
  .site-panel { position: absolute; z-index: 34; left: 0; right: 0; bottom: 0; width: auto; max-width: none; height: 66%; border-radius: 14px 14px 0 0; }
  .site-doc { z-index: 36; }
  .doc-main { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .doc-side { border-left: 0; border-top: 1px solid var(--line); max-height: 40%; }
  .doc-paper { padding: 28px 24px; }
  .nm-steps li { font-size: 10px; }
  .nm-note { left: calc(var(--rail) + 20px); right: 8px; width: auto; transform: none; animation: none; }
  .site-page.panel-open .nm-note { left: calc(var(--rail) + 20px); right: 8px; }
  .stage-note { display: none; }
  .nm-ctrls { bottom: 24px; right: 8px; }
  .ivion-empty { padding: 20px 16px 20px calc(var(--rail) + 24px); }
  .iw { display: none !important; }
  .dock .site-rail { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 62px; flex-direction: row; padding: 4px; border-width: 1px 0 0; }
  .dock .tb { flex: 1; width: auto; min-height: 0; }
  .dock .tb-sep { width: 2px; height: 30px; margin: 0 2px; }
  .dock .site-stage, .dock.panel-open .site-stage { left: 0; bottom: 62px; }
  .dock.panel-open .site-stage { bottom: calc(62px + 55%); }
  .dock .site-panel { width: auto; bottom: 62px; height: 55%; border-radius: 0; border-width: 1px 0 0; }
}
