/* Shared Observatory controls and surfaces for the app and public pages. */
:root {
  --apogee-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --apogee-bg: #111d22;
  --apogee-ink: #14242a;
  --apogee-paper: #dcd6c2;
  --apogee-cream: #eee9d8;
  --apogee-muted: #4c5d57;
  --apogee-copper: #9c522b;
  --apogee-sand: #d4b48b;
  --apogee-panel-border: #a99b79;
  --apogee-panel-radius: 12px;
}
[hidden] { display: none !important; }
body:has(#app-header) { display: flex; flex-direction: column; background: var(--apogee-bg); }
body:has(#app-header) .shell { height: auto; flex: 1; min-height: 0; }
.apogee-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  flex: none;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 40px;
  color: var(--apogee-cream);
  font: 600 14px/1.4 var(--apogee-font);
}
.apogee-brand {
  display: block;
  color: var(--apogee-cream);
  text-decoration: none;
  white-space: nowrap;
}
.apogee-wordmark {
  display: block;
  font: 900 40px/1 Arial, Helvetica, sans-serif;
  letter-spacing: -.055em;
}
.apogee-wordmark span { color: #bb6b3a; }
.apogee-brand small {
  display: block;
  margin-top: 10px;
  color: #cbbb99;
  font: 700 8px/1.4 var(--apogee-font);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.apogee-header nav, .apogee-header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  min-width: 0;
}
.apogee-header #public-site-links:not([hidden]) { display: contents; }
.apogee-header .apogee-nav-action,
.apogee-header .apogee-demo-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 0;
  color: var(--apogee-cream);
  background: transparent;
  border: 0;
  border-radius: 0;
  font: 600 14px/1.4 var(--apogee-font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  transition: color .16s ease, background .16s ease;
}
.apogee-header .apogee-nav-action:hover,
.apogee-header .apogee-nav-action[aria-current="page"],
.apogee-header .apogee-account-action.active {
  color: var(--apogee-sand);
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
  box-shadow: none;
  transform: none;
}
.apogee-header .apogee-account-action { width: 96px; justify-content: flex-end; }
.apogee-header .header-avatar { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; object-fit: cover; }
.apogee-header .apogee-account-action:has(.header-avatar:not([hidden])) { width: 124px; }
.apogee-header .apogee-nav-action.ok svg { color: #a9d1b3; }
.apogee-header .apogee-demo-action {
  padding-inline: 13px;
  border-radius: 6px;
  background: var(--apogee-copper);
  color: #fff4df;
}
.apogee-header .apogee-demo-action:hover { background: #884026; color: #fff4df; }
.apogee-header svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.apogee-header .apogee-demo-action svg { fill: currentColor; stroke-width: 1; }
.apogee-header a:focus-visible,
.apogee-header button:focus-visible,
.apogee-button:focus-visible {
  outline: 2px solid var(--apogee-sand);
  outline-offset: 4px;
}
.apogee-panel {
  color: var(--apogee-ink);
  color-scheme: light;
  background: var(--apogee-paper);
  border: 1px solid var(--apogee-panel-border);
  border-radius: var(--apogee-panel-radius);
  box-shadow: none;
  overflow: hidden;
}
.apogee-panel-preview {
  display: block;
  width: 100%;
  height: auto;
  background: #14262c;
  border-bottom: 1px solid #b1a68a;
}
.apogee-panel-body { display: flex; flex: 1; flex-direction: column; padding: 25px 28px 28px; }
.apogee-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  align-self: flex-start;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--apogee-copper);
  color: #fff4df;
  font: 650 14px/1.4 var(--apogee-font);
  text-align: center;
  text-decoration: none;
}
.apogee-button:hover { background: #884026; color: #fff4df; }
.apogee-button.secondary { background: var(--apogee-cream); color: var(--apogee-ink); border-color: #7f8b7b80; }
.apogee-button.secondary:hover { background: #e6dfca; border-color: #864923; color: var(--apogee-ink); }
@media (max-width: 800px) {
  .apogee-panel-body { padding: 24px 25px 26px; }
}
@media (max-width: 1000px) {
  .apogee-header { grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; }
  .apogee-header nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .apogee-header-tools { grid-column: 2; grid-row: 1; }
}
@media (max-width: 600px) {
  .apogee-header { padding: 20px 22px; gap: 16px; }
  .apogee-wordmark { font-size: 34px; }
  .apogee-brand small { font-size: 7px; letter-spacing: .18em; }
  .apogee-header-tools { display: contents; }
  .apogee-header .apogee-account-action { grid-column: 2; grid-row: 1; width: 90px; }
  .apogee-header nav { grid-column: 1; grid-row: 2; gap: 4px; }
  .apogee-header nav .apogee-nav-action { width: 44px; padding-inline: 0; }
  .apogee-header nav .apogee-nav-label { display: none; }
  .apogee-header .apogee-demo-action { grid-column: 2; grid-row: 2; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .apogee-nav-action { transition: none; } }
