:root {
  --ink: #162033;
  --muted: #607089;
  --line: rgba(22, 32, 51, 0.14);
  --panel: rgba(255, 255, 255, 0.92);
  --panel-soft: rgba(247, 250, 255, 0.90);
  --accent: #6f5df6;
  --accent-2: #4f46e5;
  --danger: #cc3344;
  --shadow: 0 16px 45px rgba(30, 40, 80, 0.13);
  --radius: 22px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(111, 93, 246, 0.16), transparent 35%),
    linear-gradient(180deg, #f7f8fd 0%, #edf2fb 100%);
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar {
  min-height: 96px;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 210px;
  gap: 1.2rem;
  align-items: center;
  padding: 0.8rem 1.3rem;
}
.logo-link { display: inline-flex; align-items: center; }
.logo-lux { width: 92px; height: 92px; object-fit: contain; border-radius: 0 0 18px 0; }
.logo-obspm { max-width: 380px; width: 100%; height: 48px; object-fit: contain; object-position: left center; }
.brand-with-logo { display: grid; grid-template-columns: minmax(240px, 400px) minmax(280px, 1fr); gap: 1.25rem; align-items: center; }
.brand h1 { margin: 0; font-size: clamp(1.25rem, 2.2vw, 2.05rem); line-height: 1.05; letter-spacing: -0.03em; }
.subtitle { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.98rem; }
.lang-box {
  justify-self: end;
  min-width: 185px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

/* Language selector — same "globe + compact pill" look as main_site's #nav-lang.
   dcc.Dropdown (Dash >=2.17) renders its own markup (.dash-dropdown*) and its
   default CSS is injected by an async JS chunk, which can load *after* this
   stylesheet — so these overrides use !important and are unscoped (there is
   only one dropdown on the site, so no collision risk) to reliably win. */
.lang-select-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  transition: background 0.14s;
  cursor: pointer;
}
.lang-select-wrapper:hover { background: rgba(79, 70, 229, 0.07); }
.lang-globe { font-size: 15px; line-height: 1; pointer-events: none; flex-shrink: 0; }

.lang-select-wrapper .dash-dropdown {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-width: 90px !important;
  width: auto !important;
}
.lang-select-wrapper .dash-dropdown-trigger {
  padding: 0 !important;
  min-height: auto !important;
  height: auto !important;
  justify-content: flex-start !important;
}
.lang-select-wrapper .dash-dropdown-grid-container {
  justify-items: start !important;
}
.lang-select-wrapper .dash-dropdown-value,
.lang-select-wrapper .dash-dropdown-placeholder {
  color: #314d72 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  text-align: left !important;
}
.lang-select-wrapper .dash-dropdown-trigger-icon {
  color: #607089 !important;
  fill: #607089 !important;
}
.lang-select-wrapper .dash-dropdown:focus {
  border: none !important;
  outline: none !important;
}

/* The options panel is portaled to <body> (Radix popover), so it can't be
   scoped under .lang-select-wrapper — harmless since it's the only dropdown
   on the site. */
.dash-dropdown-content {
  border-radius: 10px !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 8px 24px rgba(22, 32, 51, 0.12) !important;
}
.dash-dropdown-option {
  font-size: 13px !important;
  font-weight: 700 !important;
  text-align: left !important;
}
.main-shell { flex: 1; display: grid; grid-template-columns: 245px minmax(0, 1fr); align-items: stretch; }
.left-sidebar {
  position: sticky;
  top: 97px;
  height: calc(100vh - 97px);
  padding: 1.2rem 1rem;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(9px);
  overflow: auto;
}
.side-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; color: var(--muted); margin: 0 0 0.75rem; }
.side-nav { display: flex; flex-direction: column; gap: 0.45rem; }
.side-link {
  display: block;
  padding: 0.78rem 0.85rem;
  border-radius: 15px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
}
.side-link:hover { background: white; border-color: var(--line); box-shadow: 0 8px 24px rgba(30,40,80,0.08); text-decoration: none; }
.side-link-app { color: #322f84; background: rgba(111,93,246,0.08); }
.side-note { margin-top: 1rem; padding: 0.9rem; border-radius: 17px; background: var(--panel-soft); border: 1px solid var(--line); font-size: 0.82rem; color: var(--muted); }
.side-small-title { font-weight: 900; color: var(--ink); margin-bottom: 0.35rem; }
.side-order { margin: 0; padding-left: 1.2rem; }
.content { width: 100%; max-width: 1760px; margin: 0 auto; padding: 1.35rem; }
.page-stack { display: flex; flex-direction: column; gap: 1rem; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}
.hero-card h2, .card h2 { margin-top: 0; letter-spacing: -0.02em; }
.card h3, .card h4 { margin-top: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.button, .button-link, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(79,70,229,0.23);
}
.button:hover, .button-link:hover { text-decoration: none; transform: translateY(-1px); }
.secondary-button { background: #eef0ff !important; color: #3730a3 !important; box-shadow: none !important; text-decoration: none !important; }
.tool-page { display: flex; flex-direction: column; gap: 1rem; }
.tool-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; align-items: start; }
.tool-sidebar { position: sticky; top: 118px; display: flex; flex-direction: column; gap: 0.9rem; max-height: calc(100vh - 130px); overflow: auto; }
.tool-plot-card { min-width: 0; }
.two-plot-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1rem; }
.parameter-panel { background: rgba(255,255,255,0.82); border: 1px solid var(--line); border-radius: 18px; padding: 0.9rem; }
.expert-details summary { cursor: pointer; font-weight: 900; color: #322f84; }
.control { margin-bottom: 0.9rem; }
.control-label { display: block; font-size: 0.82rem; color: var(--muted); font-weight: 800; margin-bottom: 0.35rem; }
.button-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.6rem 0; }
.checklist label { display: block; margin: 0.35rem 0; font-weight: 700; }
.summary-line, .plot-note { color: var(--muted); font-size: 0.9rem; padding: 0.5rem 0.3rem 0; }
.markdown { line-height: 1.6; }
.site-footer { border-top: 1px solid var(--line); padding: 1rem 1.35rem; color: var(--muted); background: rgba(255,255,255,0.62); }
.footer-contact { max-width: 1760px; margin: 0 auto; }
@media (max-width: 1180px) {
  .main-shell { grid-template-columns: 1fr; }
  .left-sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .tool-workspace { grid-template-columns: 1fr; }
  .tool-sidebar { position: static; max-height: none; }
  .two-plot-grid, .grid-3, .grid-2, .brand-with-logo { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: 84px 1fr; }
  .lang-box { grid-column: 1 / -1; justify-self: stretch; }
  .logo-lux { width: 78px; height: 78px; }
}

/* Unified portal refinements requested after first preview */
.site-header { position: sticky; top: 0; z-index: 30; }
.main-shell { grid-template-columns: 270px minmax(0, 1fr); }
.left-sidebar {
  top: 98px;
  height: calc(100vh - 98px);
  background: linear-gradient(180deg, #294f91 0%, #24477f 48%, #1d3767 100%);
  color: white;
  border-right: 1px solid rgba(255,255,255,0.18);
  box-shadow: 8px 0 28px rgba(29, 55, 103, 0.18);
}
.side-title { color: rgba(255,255,255,0.72); }
.side-link {
  color: white;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}
.side-link:hover {
  background: rgba(255,255,255,0.18);
  color: white;
  border-color: rgba(255,255,255,0.35);
  text-decoration: none;
}
.side-link-app { color: white; background: rgba(255,255,255,0.10); }
.side-note {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.82);
}
.side-small-title { color: white; }
.side-note-text { margin: 0; }
.application-page { display: flex; flex-direction: column; gap: 1.35rem; }
.app-nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  padding: 1.05rem 1.15rem;
  margin: -1.35rem -1.35rem 1rem -1.35rem;
  background: linear-gradient(90deg, #162842 0%, #315da2 100%);
  border-top: 4px solid #7b62ff;
  box-shadow: 0 12px 26px rgba(22,40,66,0.14);
}
.app-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.45rem 0.78rem;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}
.app-nav-link:hover { color: white; background: rgba(255,255,255,0.22); text-decoration: none; }
.app-nav-link.active {
  background: linear-gradient(180deg, #2fbf63 0%, #22954d 100%);
  border-color: rgba(255,255,255,0.42);
}
.site-footer {
  background: transparent;
  border-top: 0;
  padding: 1.2rem 1.35rem 1.8rem;
}
.footer-contact {
  max-width: 1760px;
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(22,32,51,0.14);
  text-align: center;
  font-size: 0.78rem;
  color: #6b7280;
}
.footer-contact a { color: #6b7280; }
.page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1180px) {
  .main-shell { grid-template-columns: 1fr; }
  .left-sidebar { position: static; height: auto; }
  .app-nav-bar { margin-left: -1.35rem; margin-right: -1.35rem; }
  .page-grid { grid-template-columns: 1fr; }
}

/* v5 refinements */
.app-nav-wrap {
  margin: -1.35rem -1.35rem 1rem -1.35rem;
  background: linear-gradient(90deg, #162842 0%, #315da2 100%);
  border-top: 4px solid #7b62ff;
  box-shadow: 0 12px 26px rgba(22,40,66,0.14);
}
.app-nav-wrap .app-nav-bar {
  margin: 0;
  padding-top: 0.55rem;
  border-top: 0;
  box-shadow: none;
  background: transparent;
}
.app-section-title {
  color: white;
  font-weight: 900;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.15rem 0.1rem;
}
.gm-observation-panel {
  padding: 0.55rem 0.7rem;
}
.compact-panel-title {
  font-size: 0.84rem;
  line-height: 1.1;
  color: #2d3748;
  font-weight: 900;
  margin-bottom: 0.45rem;
}
.gm-overlays-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  align-items: center;
}
.gm-overlays-inline label,
.gm-overlay-label {
  display: inline-flex !important;
  align-items: center;
  gap: 0.25rem;
  margin: 0 !important;
  font-size: 0.82rem;
  font-weight: 750;
  white-space: nowrap;
}
.gm-overlay-input { margin-right: 0.2rem; }


/* v6: HI standalone CSS extension and compact parameter boxes */
.hi-standalone-content .tool-workspace { grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; align-items: start; }
.hi-standalone-content .tool-sidebar { position: sticky; top: 118px; display: flex; flex-direction: column; gap: 0.9rem; max-height: calc(100vh - 130px); overflow: auto; }
.hi-standalone-content .parameter-panel,
.parameter-panel.compact-panel { background: rgba(255,255,255,0.92); border: 1px solid rgba(22,32,51,0.14); border-radius: 18px; padding: 0.85rem; box-shadow: 0 10px 26px rgba(30,40,80,0.08); }
.hi-standalone-content .parameter-panel h3, .parameter-panel h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.hi-standalone-content .control-hint, .control-hint { color: #607089; font-size: 0.82rem; margin: 0.15rem 0 0.65rem; line-height: 1.35; }
.controls-table { width: 100%; border-collapse: collapse; }
.control-cell { padding: 0; }
.compact-control { margin-bottom: 0.75rem; }
.hi-standalone-content .tool-top-card { padding: 0.9rem 1rem; }
.hi-standalone-content .tool-top-card h2 { margin-bottom: 0.55rem; }
.hi-standalone-content .tool-plot-card { padding: 0.8rem; }
.markdown mjx-container { overflow-x: auto; overflow-y: hidden; max-width: 100%; }
@media (max-width: 1180px) { .hi-standalone-content .tool-workspace { grid-template-columns: 1fr; } .hi-standalone-content .tool-sidebar { position: static; max-height: none; } }

/* v18: supporting videos page, independent iframe cards */
.video-page-card {
  max-width: 1250px;
  margin: 0 auto;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.video-grid-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}
.video-card-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}
.video-card-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-card-body {
  padding: 1rem 1.05rem 1.1rem;
}
.video-card-body h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  color: #0f172a;
}
.video-card-body p {
  margin: 0 0 0.8rem;
  color: #475569;
  font-size: 0.94rem;
  line-height: 1.45;
}
.video-card-link {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  color: #2563eb;
  text-decoration: none;
  font-size: 0.93rem;
}
.video-card-link:hover { text-decoration: underline; }
.video-link-note {
  margin-top: 1.4rem;
  color: #475569;
  font-size: 0.95rem;
}
.video-link-note a {
  font-weight: 800;
  color: #2563eb;
  text-decoration: none;
}
.video-link-note a:hover { text-decoration: underline; }
.video-empty-card {
  margin-top: 1.4rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  background: rgba(248, 250, 252, 0.9);
}
.video-empty-note {
  margin: 0;
  color: #475569;
}

/* v20: embedded PDF slide cards */
.slides-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}
.slide-grid-card {
  min-height: 640px;
}
.slide-card-player {
  position: relative;
  width: 100%;
  height: 430px;
  background: #0f172a;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}
.slide-card-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}
.slide-card-body p {
  font-size: 0.95rem;
  line-height: 1.55;
}
@media (max-width: 760px) {
  .slides-grid { grid-template-columns: 1fr; }
  .slide-card-player { height: 360px; }
}

/* Radio telescope page */
.radio-page-card {
    max-width: 1320px;
    margin: 0 auto;
}

.radio-domain-block {
    margin-top: 2rem;
}

.radio-domain-title {
    margin: 0 0 1rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.radio-telescope-group {
    margin-top: 1.25rem;
}

.radio-telescope-group > h3 {
    margin: 0 0 0.8rem;
    font-size: 1.12rem;
    color: #1e3a8a;
}

.radio-telescope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.1rem;
}

.radio-telescope-card {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

.radio-telescope-iframe {
    display: block;
    width: 100%;
    height: 680px;
    border: 0;
    background: #fff;
}


/* Bibliography page */
.bibliography-page-card {
    max-width: 1320px;
    margin: 0 auto;
}

.bibliography-grid {
    margin-top: 1.4rem;
}

.bibliography-iframe {
    display: block;
    width: 100%;
    height: 720px;
    border: 0;
    background: #fff;
}

@media (max-width: 760px) {
    .radio-telescope-iframe { height: 760px; }
    .bibliography-iframe { height: 800px; }
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.side-menu-block {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;

    padding: 0.55rem;
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.side-menu-block .side-link {
    margin: 0;
}












.remote-observations-card {
    max-width: 1400px;
    margin: 0 auto;
}

.remote-observations-frame-wrap {
    margin-top: 1.2rem;
    width: 100%;
    height: calc(100vh - 260px);
    min-height: 650px;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.remote-observations-iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
