/* Sky: a quiet plum-and-indigo night to wander in. More exploratory than the evening pocket, same hush. Motion is slow and
   optional: nothing here depends on animation, and reduced motion removes the little there is. */
.sky-view { --sky-ink: #ece8f7; --sky-dim: #b9aee2; --sky-line: rgba(235, 240, 255, .8); position: relative; min-height: calc(100dvh - 80px); padding: 0; overflow: hidden;
  background: #03050f; color: var(--sky-ink); }
/* Outer space: a nebula drawn small and stretched, and a sharp field of stars over it. They move a little slower than the sky. */
.sky-field { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sky-field > div { position: absolute; inset: 0; background-repeat: repeat; }
.sky-field .space-stars { opacity: .95; }
.sky-field .space-nebula { background-color: #03050f; filter: blur(16px) saturate(.9); inset: -24px; }

.sky-stage { position: absolute; inset: 0; cursor: grab; touch-action: none; outline: none; }
.sky-stage.panning { cursor: grabbing; }
.sky-stage:focus-visible { box-shadow: inset 0 0 0 2px #c9baff; }
.sky-svg { position: relative; width: 100%; height: 100%; display: block; color: var(--sky-line); }
/* 3D is a picture drawn behind the same page layer. The page layer keeps every label, line, focus ring and name for screen readers. */
.sky-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.mode-3d .sky-svg .body .art { display: none; }
.mode-3d .sky-field .space-stars { opacity: .35; }

.sky-svg .body { cursor: pointer; outline: none; }
.sky-svg .body:focus-visible .hit { stroke: #c9baff; stroke-width: 2; fill: rgba(201, 186, 255, .12); }
.sky-svg .planet.ember { opacity: .75; }
.sky-svg .body .core { fill: #fff3d1; }
.sky-svg .body .label { fill: var(--sky-ink); font: 12px "DM Sans", sans-serif; opacity: 0; paint-order: stroke; stroke: #150f2b; stroke-width: 3px; pointer-events: none; }
.sky-svg .body.show-label .label, .sky-svg .body:hover .label, .sky-svg .body:focus-visible .label { opacity: 1; }
.sky-svg .body.selected .core { fill: #fff; }
.sky-svg .body.selected .hit { stroke: #c9baff; stroke-width: 1.5; fill: rgba(201, 186, 255, .1); }
.sky-svg .constellation-mark { fill: none; stroke: #c9baff; stroke-width: 1.5; }

/* Lines: shape differs as well as brightness, so the difference never depends on colour. */
.sky-svg .link line { stroke: currentColor; stroke-width: 1.5; }
.sky-svg .link.confirmed line { stroke: rgba(240, 246, 255, .92); stroke-width: 1.1; filter: drop-shadow(0 0 2.5px rgba(150, 180, 255, .9)); }
.sky-svg .link.suggested line { stroke: #9fb0e8; stroke-dasharray: 3 7; stroke-width: 1; opacity: .7; }
.sky-svg .link.faded { opacity: .15; }
.sky-svg .link-label { fill: var(--sky-dim); font: 10px "DM Mono", monospace; opacity: 0; paint-order: stroke; stroke: #150f2b; stroke-width: 3px; }
.sky-svg .link.show-label .link-label { opacity: 1; }
.sky-svg .grouping circle { fill: rgba(201, 186, 255, .04); stroke: rgba(201, 186, 255, .35); stroke-width: 1; stroke-dasharray: 1 5; stroke-linecap: round; }
.sky-svg .grouping text { fill: var(--sky-dim); font: 11px "DM Mono", monospace; letter-spacing: .06em; }

.sky-empty, .sky-error { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); max-width: 360px; text-align: center; line-height: 1.6; color: var(--sky-dim); background: rgba(20, 14, 44, .7); border: 1px solid rgba(201, 186, 255, .2); border-radius: 14px; padding: 18px 22px; }
.sky-lost button { display: block; margin: 12px auto 0; min-height: 44px; border-radius: 10px; padding: 0 18px; background: #c9baff; color: #1c1733; border: 0; font: 500 14px "DM Sans", sans-serif; cursor: pointer; }
.sky-empty strong { display: block; font: 400 22px "Newsreader", serif; color: var(--sky-ink); margin-bottom: 6px; }
.sky-empty[hidden], .sky-lost[hidden], .sky-error[hidden], .sky-notice[hidden], .sky-orbit[hidden] { display: none; }
.sky-notice { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 4; max-width: min(460px, calc(100% - 32px)); text-align: center; font-size: 13px; line-height: 1.5; color: var(--sky-ink); background: rgba(28, 22, 58, .92); border: 1px solid rgba(201, 186, 255, .3); border-radius: 12px; padding: 10px 14px; margin: 0; }
.sky-empty a, .sky-panel a { color: #d9ccff; }

.sky-controls { position: absolute; left: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 32px); z-index: 3; }
.sky-controls button { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid rgba(201, 186, 255, .3); background: rgba(28, 22, 58, .85); color: var(--sky-ink); font: 500 15px "DM Sans", sans-serif; cursor: pointer; display: inline-grid; place-items: center; padding: 0 12px; }
.sky-controls button:hover { background: #2b2352; }
.sky-controls button[aria-pressed=true] { background: #c9baff; color: #1c1733; border-color: #c9baff; }
.sky-controls button:disabled { opacity: .6; cursor: progress; }
.sky-orbit { display: contents; }
.sky-controls button:focus-visible { outline: 2px solid #c9baff; outline-offset: 2px; }
.sky-legend { position: absolute; left: 16px; top: 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--sky-dim); z-index: 3; pointer-events: none; max-width: calc(100% - 32px); }
.sky-legend i { display: inline-block; width: 26px; height: 0; border-top: 2px solid #d9ccff; vertical-align: middle; margin-right: 6px; }
.sky-legend i.legend-dashed { border-top: 2px dashed #a79bd6; }
.sky-legend .legend-note { font-style: italic; }

.sky-panel { position: absolute; right: 16px; top: 14px; bottom: 16px; width: min(380px, calc(100% - 32px)); overflow-y: auto; z-index: 3; background: rgba(24, 18, 50, .92); border: 1px solid rgba(201, 186, 255, .22); border-radius: 16px; padding: 18px 18px 22px; backdrop-filter: blur(6px); }
.sky-panel:has(.sky-panel-empty) { bottom: auto; }
.sky-panel[hidden] { display: none; }
.sky-panel-close { position: sticky; top: 0; float: right; z-index: 1; width: 44px; height: 44px; margin: -10px -10px 0 8px; border-radius: 10px; border: 1px solid rgba(201, 186, 255, .3); background: rgba(28, 22, 58, .9); color: var(--sky-ink); font: 400 24px/1 "DM Sans", sans-serif; cursor: pointer; display: inline-grid; place-items: center; }
.sky-panel-close:hover { background: #2b2352; }
.sky-panel-close:focus-visible { outline: 2px solid #c9baff; outline-offset: 2px; }
.sky-panel { overflow-x: hidden; } .sky-panel select, .sky-panel input[type=submit], .sky-panel button { max-width: 100%; box-sizing: border-box; } .sky-link-form select { width: 100%; }
.sky-panel-empty, .sky-none { color: var(--sky-dim); font-size: 13px; line-height: 1.6; margin: 0; }
.sky-panel h2 { font: 400 26px/1.15 "Newsreader", serif; letter-spacing: -.02em; margin: 6px 0 12px; }
.sky-panel h3, .sky-page h3 { font: 500 11px "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: #a79bd6; margin: 20px 0 8px; }
.sky-original { margin: 0; padding: 12px 14px; border-left: 2px solid #8f74d4; background: rgba(143, 116, 212, .12); border-radius: 0 10px 10px 0; font: 16px/1.6 "Newsreader", serif; white-space: pre-wrap; }
.sky-source, .sky-why { font-size: 12.5px; line-height: 1.6; color: var(--sky-dim); margin: 6px 0 0; }
.sky-dates { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; margin: 14px 0 0; }
.sky-dates dt { color: #a79bd6; } .sky-dates dd { margin: 0; } .sky-dates small { display: block; color: var(--sky-dim); }
.sky-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.sky-links li { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(201, 186, 255, .25); }
.sky-links li.suggested { border-style: dashed; background: rgba(167, 155, 214, .06); }
.sky-edge-state { display: block; font: 10px "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: #a79bd6; margin-bottom: 3px; }
.sky-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.sky-row form, .sky-row .button_to { display: contents; }
.sky-link-form { display: grid; gap: 6px; font-size: 13px; }
.sky-link-form select { background: #261f45; color: var(--sky-ink); border: 1px solid rgba(201, 186, 255, .3); border-radius: 8px; padding: 8px; min-height: 40px; }
.sky-panel .primary-light, .sky-page .primary-light { background: #c9baff; color: #1c1733; border: 0; border-radius: 9px; padding: 10px 14px; font: 500 13px "DM Sans", sans-serif; cursor: pointer; text-decoration: none; display: inline-block; }
.sky-panel .secondary-light, .sky-page .secondary-light { background: transparent; color: var(--sky-ink); border: 1px solid rgba(201, 186, 255, .4); border-radius: 9px; padding: 10px 14px; font: 500 13px "DM Sans", sans-serif; cursor: pointer; text-decoration: none; display: inline-block; }
.sky-panel .quiet-link { background: transparent; border: 0; color: var(--sky-dim); font-size: 12px; text-decoration: underline; cursor: pointer; padding: 0; margin-left: 8px; }

.sky-list { position: absolute; left: 16px; bottom: 74px; max-width: min(340px, calc(100% - 32px)); z-index: 3; background: rgba(24, 18, 50, .85); border: 1px solid rgba(201, 186, 255, .2); border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.sky-list summary { cursor: pointer; color: var(--sky-dim); min-height: 28px; display: flex; align-items: center; }
.sky-list ul { list-style: none; margin: 8px 0 4px; padding: 0; max-height: 36vh; overflow-y: auto; display: grid; gap: 6px; }
.sky-list a { color: #d9ccff; } .sky-list small { color: var(--sky-dim); margin-left: 6px; }

.sky-overlay[hidden] { display: none; }
.sky-overlay { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 16px; background: rgba(14, 10, 28, .72); backdrop-filter: blur(3px); }
.sky-overlay-card { width: min(560px, 100%); max-height: 100%; overflow-y: auto; background: #1c1733; border: 1px solid rgba(201, 186, 255, .3); border-radius: 18px; padding: 26px 26px 20px; box-shadow: 0 30px 100px rgba(0, 0, 0, .5); }
.sky-overlay-card h2 { font: 400 34px/1.1 "Newsreader", serif; letter-spacing: -.03em; margin: 0 0 8px; }
.sky-overlay-card p { color: var(--sky-dim); line-height: 1.6; margin: 0 0 14px; }
.sky-overlay-card dt { font-weight: 600; margin-top: 12px; } .sky-overlay-card dd { margin: 2px 0 0; color: var(--sky-dim); line-height: 1.6; font-size: 14px; }
.sky-overlay-card kbd { font: 11px "DM Mono", monospace; border: 1px solid rgba(201, 186, 255, .35); border-radius: 4px; padding: 1px 5px; }
.sky-check { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 14px; min-height: 44px; }
.sky-check input { width: 18px; height: 18px; }
.sky-overlay-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.sky-overlay-actions button { min-height: 44px; border-radius: 10px; padding: 0 18px; cursor: pointer; font: 500 14px "DM Sans", sans-serif; }
.sky-overlay-actions .primary-light { background: #c9baff; color: #1c1733; border: 0; }
.sky-overlay-actions .secondary-light { background: transparent; color: var(--sky-ink); border: 1px solid rgba(201, 186, 255, .4); }

/* Full pages in the same sky: constellations, products, explorations. */
.sky-page { position: relative; z-index: 1; width: min(920px, 100%); margin: 0 auto; padding: 36px clamp(18px, 4vw, 48px) 80px; color: var(--sky-ink); }
.sky-page h1 { font: 400 clamp(34px, 4vw, 52px)/1.05 "Newsreader", serif; letter-spacing: -.04em; margin: 8px 0 12px; color: #f1eefc; }
.sky-page p { color: var(--sky-dim); line-height: 1.65; }
.sky-page a { color: #d9ccff; }
.sky-card { border: 1px solid rgba(201, 186, 255, .25); border-radius: 14px; padding: 14px 16px; background: rgba(36, 28, 72, .5); }
.sky-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 14px; }
.sky-form { display: grid; gap: 8px; margin-top: 14px; }
.sky-form label { font-size: 13px; color: #cfc6ee; }
.sky-form input[type=text], .sky-form textarea, .sky-form select { background: #261f45; color: var(--sky-ink); border: 1px solid rgba(201, 186, 255, .3); border-radius: 10px; padding: 11px 12px; font: 15px "DM Sans", sans-serif; min-height: 44px; }
.sky-form textarea { min-height: 96px; }
.sky-form input[type=submit], .sky-form button { justify-self: start; }
.sky-check-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; max-height: 280px; overflow-y: auto; }
.sky-check-list label { display: flex; gap: 10px; align-items: center; min-height: 40px; padding: 4px 8px; border-radius: 8px; }
.sky-check-list label:hover { background: rgba(201, 186, 255, .08); }
.sky-tag { display: inline-block; font: 10px "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; border: 1px solid rgba(201, 186, 255, .4); border-radius: 999px; padding: 2px 9px; color: #cfc6ee; }
.sky-tag.proposed { border-style: dashed; }

@media (max-width: 760px) {
  .sky-panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 52%; border-radius: 16px 16px 0 0; }
  .sky-panel:has(.sky-panel-empty) { display: none; }
  .sky-controls { bottom: auto; top: 78px; }
  .sky-list { display: none; }
  .sky-legend { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .sky-svg *, .sky-view * { animation: none !important; transition: none !important; } }
.motion-off .sky-view * { animation: none !important; transition: none !important; }

/* Full pages: mind map, observatory, products */
.sky-view-page { background: radial-gradient(ellipse 80% 50% at 25% 0, #15246b 0, transparent 60%), linear-gradient(170deg, #070a1e, #04061a 70%); overflow-y: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mindmap { margin: 18px 0; } .mindmap svg { width: 100%; height: auto; background: rgba(36, 28, 72, .4); border: 1px solid rgba(201, 186, 255, .2); border-radius: 14px; }
.mindmap figcaption { font-size: 12.5px; color: var(--sky-dim, #b9aee2); margin-top: 6px; }
.mm-edge { stroke: #d9ccff; stroke-width: 1.8; } .mm-edge.suggested { stroke: #a79bd6; stroke-dasharray: 3 7; stroke-width: 1.2; }
.mm-edge-label { fill: #b9aee2; font: 10px "DM Mono", monospace; }
.mm-node circle:first-of-type { fill: #fff3d1; } .mm-node text { fill: #ece8f7; font: 12px "DM Sans", sans-serif; paint-order: stroke; stroke: #150f2b; stroke-width: 3px; }
.mm-node:focus-visible circle:first-of-type, .mm-node:hover circle:first-of-type { stroke: #c9baff; stroke-width: 3; }
.sky-history { font-size: 13px; color: #b9aee2; padding-left: 18px; } .sky-history time { font-family: "DM Mono", monospace; font-size: 11px; }
.obs-h { font: 500 11px "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: #a79bd6; margin: 0 0 8px; }
.obs-sources { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; } .obs-sources li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.obs-manifest { white-space: pre-wrap; font: 12px/1.5 "DM Mono", monospace; background: #150f2b; border-radius: 10px; padding: 12px; color: #cfc6ee; max-height: 320px; overflow: auto; }
.obs-messages { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 12px; }
.obs-message { border-radius: 14px; padding: 12px 16px; border: 1px solid rgba(201, 186, 255, .2); max-width: 92%; } .obs-message.user { background: rgba(143, 116, 212, .18); justify-self: end; } .obs-message.assistant { background: rgba(36, 28, 72, .6); }
.obs-message p { margin: 4px 0 0; color: #ece8f7; white-space: pre-wrap; } .obs-role { font: 10px "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: #a79bd6; }
.obs-tray { margin-top: 16px; border-style: dashed; } .obs-proposal { border-top: 1px dashed rgba(201, 186, 255, .3); padding-top: 12px; margin-top: 12px; } .obs-proposal.rejected { opacity: .55; }
.obs-compose textarea { width: 100%; }
form.inline, .sky-row form { display: contents; }
.concept-lit { color: #fff0c2; } .concept-ember { color: #c9906a; }
.sky-nav-label small { display: block; }
.sky-form input[type=date] { background: #261f45; color: var(--sky-ink, #ece8f7); color-scheme: dark; border: 1px solid rgba(201, 186, 255, .3); border-radius: 10px; padding: 11px 12px; min-height: 44px; }
.sky-form textarea { width: 100%; box-sizing: border-box; }

.sky-rearrange-form { display: contents; }
.sky-controls .sky-rearrange { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid rgba(201, 186, 255, .3); background: rgba(28, 22, 58, .85); color: var(--sky-ink); font: 500 13px "DM Sans", sans-serif; cursor: pointer; padding: 0 12px; }

.obs-flags { border: 1px dashed rgba(241, 194, 125, .6); border-radius: 10px; padding: 10px 14px; margin: 10px 0; font-size: 14px; color: #f6dfb7; } .obs-flags ul { margin: 6px 0 0; padding-left: 18px; }

/* The list card's close button: only there while the list is open, because everything but the summary is hidden when it is shut. */
.sky-list-close { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 10px; color: var(--sky-dim); font: 400 24px/1 "DM Sans", sans-serif; cursor: pointer; }
.sky-list-close:hover { background: rgba(201, 186, 255, .12); color: var(--sky-ink); }
.sky-list-close:focus-visible { outline: 2px solid #c9baff; outline-offset: -2px; }
.sky-list[open] summary { padding-right: 40px; }
