/* ==========================================================================
   Leopold-Figl-Observatorium für Astrophysik, foa.univie.ac.at
   Plain hand-editable CSS. No build step. Tokens first, then components.
   Based on the univie-style system of stefan.meingast and VISIONS, aligned
   with the university CMS layout (fgga.univie.ac.at) on 2026-11-20: navy
   unit-name bar and footer, color bars on linked teaser cards. Light-only.
   To add a dark theme later, redefine the semantic tokens only (see the
   VISIONS stylesheet for the two-trigger pattern).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts (self-hosted, SIL OFL). woff2 only.
   -------------------------------------------------------------------------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-v18-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/inter-v18-latin-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-v18-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 600; font-display: swap; src: url("../fonts/inter-v18-latin-600italic.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/source-serif-4-v8-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/source-serif-4-v8-latin-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/source-serif-4-latin-600.woff2") format("woff2"); }

/* --------------------------------------------------------------------------
   Tokens (univie system; univie blue is the accent)
   -------------------------------------------------------------------------- */
:root {
  --blue:         #005c99;   /* univie blue: links, primary buttons          */
  --blue-dark:    #034672;   /* hover                                        */
  --navy:         #032138;   /* text, unit-name bar, footer (CD: "Schwarz")   */
  --ink-strong:   #1c374c;   /* lead paragraphs                              */
  --ink-muted:    #354d60;   /* secondary text                               */
  --gray-mid:     #354d60;   /* Grau 2: AA on white and on --surface-alt     */
  --gray-base:    #9aa6af;   /* muted on dark bg only (fails AA on white)    */
  --gray-border:  #cdd3d7;
  --hairline:     #e6e9eb;
  --surface-alt:  #f2f4f5;
  --nav-current:  #b2cee0;   /* current entry in nav dropdowns (univie CMS) */
  --accent:       var(--blue);  /* decoration: card tops, nav underline, dots */

  /* --- Semantic theme tokens --------------------------------------------
     Light values below; dark mode redefines ONLY these. ------------------ */
  --bg:            #ffffff;
  --surface:       #ffffff;
  --surface-2:     var(--surface-alt);
  --text:          var(--navy);
  --text-strong:   var(--ink-strong);
  --text-muted:    var(--ink-muted);
  --text-faint:    var(--gray-mid);
  --border:        var(--hairline);
  --border-strong: var(--gray-border);
  --link:          var(--blue);
  --link-hover:    var(--blue-dark);
  --link-tint:     rgba(0, 92, 153, 0.07);
  --focus:         var(--blue);
  color-scheme: light;

  --sans:  "Inter", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;

  --container: 1200px;
  --header-max: 1944px;  /* univie header content width (fluid-container-full) */
  --pad-x: 60px;
  --pad-y: 96px;
  --gap-block: 64px;  /* univie: content blocks mb-16, colored bands pt/pb 32 */

  /* Grid (univie TYPO3 sites, measured 2026-11-25): one 20 px gutter
     (--spacing-gutter 1.25rem) for every column and card grid, and one text
     measure (--spacing-content-md 892px). See "Grid system" at the end. */
  --gap: 20px;
  --measure: 55.75rem;

  --radius-btn: 8px;
  --radius-card: 4px;
  --transition: 0.15s ease;

  /* Card shadows as in the university CMS (rest / hover) */
  --shadow-card-sm:   0 3px 18px -6px rgba(3, 33, 56, 0.24);
  --shadow-card:      0 3px 18px -6px rgba(3, 33, 56, 0.24), 0 12px 42px -4px rgba(24, 39, 75, 0.12);

  /* Secondary CD colors. Decoration only (top bars of linked teaser cards),
     never for text. Hellgrün, Gelb and Orangerot stay reserved for the
     safety-level dots, see .status-* below. */
  --mint:   #2ba4a6;   /* Mintgrün: Beobachtungsbetrieb                   */
  --lilac:  #ca8adb;   /* Lila: Forschung, Teleskope, Instrumente         */
  --orange: #ff8552;   /* Orange: Besuch und Kontakt                      */

  /* Navy overlays on photos (unit-name bar 80 %, hero box and credit 70 %) */
  --navy-80: rgba(3, 33, 56, 0.8);
  --navy-70: rgba(3, 33, 56, 0.7);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--text);
  margin: 0 0 0.5em;
}
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(1.9375rem, 2.5vw + 1.4rem, 3.4375rem); line-height: 1.1; }
h2 { font-size: clamp(1.5625rem, 1.8vw + 1.1rem, 2.4375rem); line-height: 1.25; }
h3 { font-size: clamp(1.375rem, 0.4vw + 1.25rem, 1.5625rem); line-height: 1.22; }

p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); }
/* Text links as in the university CMS: semibold, light underline that turns
   solid on hover and focus. */
main :where(a:not([class])) {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(0, 92, 153, 0.3);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--transition);
}
main :where(a:not([class])):hover,
main :where(a:not([class])):focus-visible { text-decoration-color: currentColor; }

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }


/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--blue);
  color: #fff;
  padding: 10px 16px;
  font: 600 14px/1 var(--sans);
  text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
}

.section {
  padding: 0 var(--pad-x) var(--gap-block);
}
.section-alt { background: var(--surface-2); padding-top: 32px; padding-bottom: 32px; margin-bottom: var(--gap-block); }
.page-hero + .section, .hero + .section { margin-top: var(--gap-block); }
.section-alt:last-child { margin-bottom: 0; }  /* gray band runs into the footer */

.lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-strong);
}
.body-muted {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
}
.section-intro {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 44px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
}

[id] { scroll-margin-top: 90px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--pad-x);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* University logo, CD manual 5.3: top left of the navigation bar, official
   artwork unchanged (UniWien_CMYK_A4.svg). The file carries its own clear
   space (mark = 44 % of the canvas height, 35 % empty canvas on the right);
   the negative margins only pull that empty canvas in, never into H/3. */
.univie-logo { display: flow-root; flex-shrink: 0; }  /* flow-root: the img margins never collapse out (no-JS open menu) */
.univie-logo img {
  display: block;
  height: 80px;
  width: auto;
  max-width: none;
  margin: -10px -64px -31px -12px;  /* mark: 14.6 % from the top, 41 % from the bottom */
}
.univie-logo:focus-visible { outline-offset: 12px; }
/* The image overflows the link by its clear-space canvas (negative margins);
   only the link box, i.e. the visible mark, takes clicks, so the canvas never
   covers the unit-name link below or the header next to the logo. */
.univie-logo img { pointer-events: none; }
/* Desktop header as on the university CMS (emerge, fgga): logo 212 px wide,
   12 px from the window edge, header about 110 px tall; the unit name lines
   up with the logo. Tablets and phones keep the compact header. */
@media (min-width: 1180px) {
  /* Content capped at --header-max and centered on very wide screens, as on
     the univie CMS (fluid-container-full); backgrounds stay full width. */
  .site-header { padding: 10px max(12px, calc(50% - var(--header-max) / 2 + 12px)); }  /* two rows on the right: about 110 px */
  .univie-logo img { height: 119px; margin: -15px -96px -46px -18px; }
  body .unit-bar { padding-left: max(12px, calc(50% - var(--header-max) / 2 + 12px)); padding-right: max(12px, calc(50% - var(--header-max) / 2 + 12px)); }
}

.site-nav > ul {
  display: flex;
  align-items: center;
  gap: 24px;  /* univie: 16 px semibold items, 24 px apart */
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav > ul > li { display: flex; }
.site-nav > ul > li > a,
.nav-sub-toggle {
  position: relative;
  font: 600 16px/1 var(--sans);
  color: var(--text);  /* univie nav items are navy */
  text-decoration: none;
  padding: 6px 0;
  transition: color var(--transition);
}
.site-nav > ul > li > a:hover,
.nav-sub-toggle:hover,
.nav-sub-toggle[aria-expanded="true"] { color: var(--link); }
.site-nav > ul > li > a[aria-current="page"],
.site-nav > ul > li > a.is-section,
.nav-sub-toggle.is-current { color: var(--text); }
.site-nav > ul > li > a[aria-current="page"]::after,
.site-nav > ul > li > a.is-section::after,
.nav-sub-toggle.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* Dropdowns as on the university CMS (disclosure pattern, click to open).
   In the HTML the item is a plain link and the list is hidden; site.js turns
   the link into .nav-sub-toggle. The first entry is the page itself, the
   others are its sections. */
.has-sub { position: relative; }
.nav-sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav-sub-toggle svg { transition: transform var(--transition); }
.nav-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-sub {
  position: absolute;
  top: calc(100% + 22px);
  left: -16px;
  z-index: 60;
  width: 24rem;
  margin: 0;
  padding: 16px 12px 20px;
  list-style: none;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 6px 4px rgba(3, 33, 56, 0.08);
}
.nav-sub[hidden] { display: none; }
.nav-sub.align-right { left: auto; right: -8px; }
.nav-sub a {
  display: block;
  padding: 12px 12px 13px;
  border-radius: var(--radius-card);
  font: 400 16px/1.35 var(--sans);
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition);
}
.nav-sub li + li a { padding-left: 28px; }  /* sections, indented under the page */
.nav-sub a:hover { background: var(--surface-alt); }
.nav-sub a[aria-current="page"],
.nav-sub a.is-section { background: var(--nav-current); }
.nav-sub a:focus-visible { outline-offset: -2px; }

/* Utility row above the main nav, as on the university CMS (fgga, emerge):
   14 px navy items, 44 px tall, 24 px apart, a 1 px separator between Links
   and Quicklinks, the language set off by the gap. It shows wherever the main
   nav shows; below that the same entries live in the burger menu. No search
   (static site). Quicklinks are a <details>, so they work without JS;
   site.js closes them on Escape, outside click and focus loss. */
.header-right { display: flex; align-items: center; gap: 22px; }
.header-utility { display: none; }
@media not all and (max-width: 1179px) {  /* exact complement of the burger query */
  .header-right { flex-direction: column; align-items: flex-end; gap: 8px; }
  .header-utility { display: flex; align-items: center; gap: 24px; margin-right: -4px; }
  .site-nav { padding-bottom: 10px; }  /* univie nav row: 38 px */
  .nav-sub { top: calc(100% + 20px); }  /* flush with the header's lower edge */
  [id] { scroll-margin-top: 130px; }  /* clears the two-row sticky header */
}
.utility-link,
.quicklinks summary,
.header-utility .lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 4px;
  font: 400 14px/24px var(--sans);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.header-utility .lang-switch { color: var(--link); padding: 0 6px; }
/* Hover and open: light 3 px underline; current page: solid accent */
.utility-link::after,
.quicklinks summary::after,
.header-utility .lang-switch::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 8px;
  height: 3px;
  border-radius: 2px;
  background: transparent;
  transition: background var(--transition);
}
.utility-link:hover::after,
.quicklinks summary:hover::after,
.quicklinks details[open] > summary::after,
.header-utility .lang-switch:hover::after { background: rgba(0, 92, 153, 0.3); }
.utility-link[aria-current="page"]::after { background: var(--accent); }
.utility-link + .quicklinks { position: relative; }
.utility-link + .quicklinks::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 10px;
  height: 26px;
  width: 1px;
  background: var(--gray-base);
}
.quicklinks details { position: relative; }
.quicklinks summary,
.menu-quicklinks > summary { list-style: none; }
.quicklinks summary::-webkit-details-marker,
.menu-quicklinks > summary::-webkit-details-marker { display: none; }
.quicklinks summary svg,
.menu-quicklinks > summary svg { transition: transform var(--transition); }
.quicklinks details[open] > summary svg,
.menu-quicklinks[open] > summary svg { transform: rotate(180deg); }
.quicklinks ul {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 70;
  min-width: 100%;
  margin: 0;
  padding: 12px 12px 4px;
  list-style: none;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-sm);
  max-height: calc(100vh - 70px);
  max-height: calc(100dvh - 70px);
  overflow-y: auto;
}
.quicklinks ul a,
.menu-quicklinks ul a {
  display: block;
  margin-bottom: 16px;
  padding: 0 4px;
  font: 400 14px/26px var(--sans);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}
.quicklinks ul a:hover,
.menu-quicklinks ul a:hover { color: var(--link); }
.quicklinks ul svg,
.menu-quicklinks ul svg { display: inline-block; vertical-align: -2px; margin-left: 8px; }
/* Without JS an open panel joins the flow, so it never covers the main nav */
:root:not(.js) .header-utility { align-items: flex-start; }
:root:not(.js) .quicklinks ul { position: static; box-shadow: none; padding: 4px 0 0; max-height: none; overflow: visible; }
:root:not(.js) .site-header:has(.quicklinks details[open]) { position: relative; }

/* Burger menu: language first, Links, then Quicklinks as a gray block that
   opens in place (univie mobile header). */
.menu-quicklinks {
  margin-top: 16px;
  background: var(--surface-alt);
  border-radius: var(--radius-card);
}
.menu-quicklinks > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px;
  font: 400 16px/1 var(--sans);
  color: var(--text);
  cursor: pointer;
}
.menu-quicklinks ul { margin: 0; padding: 0 16px 4px; list-style: none; }
.menu-quicklinks ul a { white-space: normal; }

/* Mobile menu: <details> so it works without JavaScript */
.menu-toggle { display: none; }  /* panel is positioned against the sticky header */
.menu-toggle > summary {
  list-style: none;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.menu-toggle > summary::-webkit-details-marker { display: none; }
.menu-toggle > summary .bar {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle[open] > summary .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[open] > summary .bar:nth-child(2) { opacity: 0; }
.menu-toggle[open] > summary .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 24px 40px -24px rgba(3, 33, 56, 0.3);
}
.menu-panel > a:not(.btn) {
  font: 600 17px/1 var(--sans);
  color: var(--text);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.menu-panel a[aria-current="page"],
.menu-panel a.is-section { color: var(--link); }
.menu-panel > a.menu-lang { color: var(--link); }  /* language first, in univie blue */
/* Sections of the two dropdown pages, indented under their page */
.menu-panel a.menu-sub { font: 400 16px/1 var(--sans); padding: 12px 0 12px 20px; }
.menu-panel .btn { margin-top: 14px; justify-content: center; }

@media (max-width: 1179px) {
  .site-nav { display: none; }
  .menu-toggle { display: block; }
}
/* Without JavaScript the open panel joins the page flow, so tabbing past it
   never lands on a link hidden underneath. With JavaScript (html.js) the menu
   closes as soon as focus leaves it, see site.js. */
@media (max-width: 1179px) {
  :root:not(.js) .site-header:has(.menu-toggle[open]) { display: block; position: relative; }
  :root:not(.js) .header-right:has(.menu-toggle[open]) { display: block; }
  :root:not(.js) .site-header:has(.menu-toggle[open]) .univie-logo { width: fit-content; }
  :root:not(.js) .menu-toggle[open] > summary { position: absolute; top: 14px; right: var(--pad-x); }
  :root:not(.js) .menu-toggle[open] > .menu-panel { position: static; margin-top: 16px; }
}

/* Unit-name bar below the header (CD manual 5.3, as on the university CMS):
   navy, the name of the unit in white, underlined, linking to the home page.
   On the home page (.is-overlay) it lies on top of the hero photo at 80 %. */
.unit-bar {
  padding: 10px var(--pad-x);
  background: var(--navy);
  --focus: #fff;
}
.unit-bar.is-overlay {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  background: var(--navy-80);
}
/* The name starts at the left edge of the logo mark, i.e. at the header
   padding, not at the centered content column. */
.unit-bar > .container { max-width: none; margin: 0; }
.unit-bar a {
  font: 400 20px/1.5 var(--sans);  /* univie: 20 px unit name */
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.unit-bar a:hover { text-decoration-thickness: 2px; }
@media (max-width: 1179px) {
  .unit-bar a { font-size: 15px; }
}
@media (max-width: 767px) {
  .unit-bar { padding-top: 6px; padding-bottom: 6px; }
  .unit-bar a { font-size: 13px; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  font: 600 15px/1 var(--sans);
  border-radius: var(--radius-btn);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.btn svg { flex-shrink: 0; }

.btn-primary {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  padding: 15px 24px;
}
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.btn-secondary {
  color: var(--link);
  background: transparent;
  border: 1px solid var(--link);
  padding: 14px 22px;
}
.btn-secondary:hover { background: var(--link-tint); }

.btn-inverted {
  color: var(--blue);
  background: #fff;
  border: 1px solid #fff;
  padding: 15px 24px;
}
.btn-inverted:hover { background: var(--hairline); border-color: var(--hairline); }

/* --------------------------------------------------------------------------
   Hero (home): full-width photo, translucent navy box with the white title
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: grid;
  background: var(--navy);
}
.hero-photo {
  grid-area: 1 / 1;
  align-self: stretch;  /* grows with the box when the box is taller than 16:7 */
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 7;
  max-height: 80vh;
  min-height: 420px;
  overflow: hidden;
}
/* The photo is drawn 25 % wider than the hero and anchored left, which moves
   the dome into the right half; the box below never reaches past the middle,
   so the dome stays clear of it. */
.hero-photo img {
  width: 125%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}
.hero-inner {
  grid-area: 1 / 1;
  z-index: 1;
  align-self: end;
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--pad-x));
  margin: 0 auto;
  padding: 96px var(--pad-x) 56px;
}
.hero-box {
  max-width: min(540px, calc(50vw - var(--pad-x) - 24px));
  padding: 32px 40px 36px;
  background: var(--navy-70);
  border-radius: var(--radius-card);
  color: #fff;
}
.hero-box h1 {
  margin: 0;
  font-size: clamp(1.9375rem, 2vw + 1.3rem, 3rem);
  line-height: 1.2;
  color: #fff;
}
.hero-kicker {
  display: block;
  margin-bottom: 14px;
  font: 600 12px/1.4 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
}
.hero-box .hero-sub {
  margin: 16px 0 0;
  max-width: 48ch;
  font-size: 18px;
  line-height: 1.55;
  color: #fff;
}
/* Tablets: taller photo, smaller box */
@media (max-width: 1023px) {
  .hero-photo { aspect-ratio: 16 / 9; }
  .hero-inner { padding-bottom: 40px; }
  .hero-box { max-width: max(300px, calc(50vw - var(--pad-x) - 24px)); padding: 24px 24px 28px; }
  .hero-box h1 { font-size: 1.75rem; }
}
/* Phones: photo on top, the box below it in solid navy over the full width */
@media (max-width: 639px) {
  .hero { display: block; }
  .hero-photo { aspect-ratio: 4 / 3; min-height: 0; max-height: none; }
  .hero-photo img { width: 100%; }
  .hero-inner { padding: 0; }
  .hero-box { max-width: none; padding: 20px var(--pad-x) 26px; background: var(--navy); border-radius: 0; }
  .hero-box .hero-sub { font-size: 16px; }
  .hero-kicker { letter-spacing: 0.1em; }
}
/* --------------------------------------------------------------------------
   Page hero (subpages): light intro strip
   -------------------------------------------------------------------------- */
.page-hero {
  padding: 72px var(--pad-x) 0;
}
.page-hero .lead { margin-top: 6px; }
.page-hero:only-child { padding-bottom: var(--gap-block); }   /* a page with nothing below the hero (404) */

/* --------------------------------------------------------------------------
   Numbers band (home): bar, large serif figure, semibold label
   -------------------------------------------------------------------------- */
.numbers h2 { margin-bottom: 32px; }
.numbers-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px var(--gap);
}
.numbers-grid li {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.numbers-grid li::before {
  content: "";
  height: 10px;
  margin-bottom: 6px;
  background: var(--accent);
  border-radius: var(--radius-card);
}
.num {
  font: 400 clamp(2.4375rem, 2vw + 1.7rem, 3.4375rem)/1.1 var(--serif);
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}
.num-label {
  font: 600 16px/1.5 var(--sans);
  color: var(--text);
  hyphens: auto;
  -webkit-hyphens: auto;
}
@media (max-width: 899px) {
  .numbers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 399px) {
  .numbers-grid { grid-template-columns: 1fr; gap: 28px; }
}
/* --------------------------------------------------------------------------
   Cards. Linked teaser cards carry a 12 px color bar, a serif title and a
   blue arrow bottom right, as on the university CMS.
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px var(--gap);   /* univie teaser grid: gap-x-gutter, sm:gap-y-10 */
}
.card-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid.cols-4 .teaser-card h3 { font-size: 22px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.teaser-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-top: 12px solid var(--teaser-bar, var(--accent));   /* one bar height for all cards */
  border-radius: var(--radius-card);
  padding: 20px 20px 20px;
  text-decoration: none;
  box-shadow: var(--shadow-card-sm);
  transition: box-shadow var(--transition);
}
/* Card titles break between words or at soft hyphens (&shy;) set at compound
   joints in the markup, never by automatic hyphenation. */
.teaser-card h3 { margin-bottom: 12px; hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; }
.teaser-card p { font-size: 16px; line-height: 1.5; color: var(--text-muted); margin: 0; }
.teaser-card .card-arrow {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  justify-content: flex-end;
  color: var(--link);
}

/* Bar colors. For a linked card the color follows the destination, so the
   same link has the same color in both languages and in every grid. The home
   grid runs in menu order, one CD color per section (Stefan 2026-11-28):
     Sternwarte, Forschung, Beobachtungsbetrieb, Besuch und Kontakt   blue, lilac, mint, orange
   Subpages take their section's color: Geschichte blue (the default),
   Teleskope and Instrumente lilac. */
a.teaser-card:hover { box-shadow: var(--shadow-card); }
a.teaser-card:is([href="forschung.html"], [href="research.html"],
                 [href="teleskope.html"], [href="telescopes.html"],
                 [href="instrumente.html"], [href="instruments.html"]) { --teaser-bar: var(--lilac); }
a.teaser-card:is([href="beobachtungsbetrieb.html"], [href="observers.html"]) { --teaser-bar: var(--mint); }
a.teaser-card:is([href="besuch.html"], [href="visit.html"]) { --teaser-bar: var(--orange); }


/* Research page: the four kinds of observation are static cards in univie blue (owner's choice) and form a 2 x 2 block; the two linked cards
   keep the colors of their destinations and form the third column:
     blue  blue  | lilac   (Teleskope)
     blue  blue  | orange  (Besuch)
   With two columns the rows read blue, blue, then lilac and orange. */
.research-grid > .teaser-card { --teaser-bar: var(--blue); }
@media (min-width: 1024px) {
  .research-grid > a.teaser-card { grid-column: 3; }
  .research-grid > a.teaser-card:nth-of-type(1) { grid-row: 1; }
  .research-grid > a.teaser-card:nth-of-type(2) { grid-row: 2; }
}

/* As on univie: four and three columns from 1024 px, two below, one below 640 */
@media (max-width: 1023px) {
  .card-grid, .card-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .card-grid, .card-grid.cols-4, .card-grid.cols-2 { grid-template-columns: 1fr; gap: var(--gap); }
  .teaser-card .card-arrow { padding-top: 12px; }
}
/* --------------------------------------------------------------------------
   Figures. Scientific plots keep a white plate in both themes.
   -------------------------------------------------------------------------- */
.figure { margin: 0; }
.figure img {
  width: 100%;
  border-radius: var(--radius-card);
}
.figure-plot img {
  background: #fff;
  border: 1px solid var(--border-strong);
  padding: 12px;
}
.figure figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-faint);
  max-width: 80ch;
}
.figure + .figure { margin-top: 56px; }

/* --------------------------------------------------------------------------
   Split (media + text)
   -------------------------------------------------------------------------- */
.split { align-items: center; }   /* columns: see "Grid system" at the end */
.split + .split { margin-top: var(--gap-block); }
.split-flip .split-figure { order: 2; }

.split-figure { margin: 0; }
.split-figure img {
  width: 100%;
  border-radius: var(--radius-card);
}
.split-figure figcaption { margin-top: 10px; font-size: 12.5px; color: var(--text-faint); }

.split-content h2, .split-content h3 { margin-bottom: 16px; }
.split-content p { font-size: 17px; line-height: 1.65; color: var(--text-muted); margin-bottom: 26px; }
.split-content p:last-child { margin-bottom: 0; }

@media (max-width: 899px) {
  .split-flip .split-figure { order: 0; }
  .split-figure { max-width: 520px; }
  .split + .split { margin-top: 64px; }
}

/* --------------------------------------------------------------------------
   Publications list
   -------------------------------------------------------------------------- */
.pub-list {
  list-style: none;
  margin: 40px 0 48px;
  padding: 0;
  border-top: 1px solid var(--border);
}
.pub-list li {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.pub-tag {
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}
.pub-title {
  font: 400 21px/1.35 var(--serif);
  margin: 0 0 8px;
}
.pub-authors {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 6px;
}
.pub-authors strong { font-weight: 600; color: var(--text); }
.pub-meta {
  font-size: 14px;
  color: var(--text-faint);
  margin: 0 0 12px;
}
.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font: 600 14px/1 var(--sans);
}
.pub-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;  /* tap target */
  text-decoration: none;
}
.pub-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Team
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}
.team-table th {
  text-align: left;
  font: 600 12px/1.5 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 18px 12px 0;
  border-bottom: 2px solid var(--border-strong);
}
.team-table td {
  padding: 11px 18px 11px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
.team-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Footer: navy, white text (CD p. 23), serif headings, underlined links
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  line-height: 1.9;
  --focus: #fff;
}
.site-footer a {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.site-footer a:hover { text-decoration-thickness: 2px; }
.footer-main {
  max-width: calc(var(--container) + 2 * var(--pad-x));
  margin: 0 auto;
  padding: 72px var(--pad-x) 0;
  display: grid;
  grid-template-columns: 1.3fr 1.4fr 1fr;
  gap: 48px 56px;
}
.footer-heading {
  margin: 0 0 20px;
  font: 400 25px/1.3 var(--serif);
  color: #fff;
}
.footer-address { font-style: normal; margin: 0; }
.footer-note { margin: 18px 0 0; max-width: 40ch; line-height: 1.6; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 12px; line-height: 1.6; break-inside: avoid; }
.footer-links.cols-2 { columns: 2; column-gap: 32px; }
.footer-links a[aria-current="page"] { font-weight: 600; }
.footer-links svg { display: inline-block; vertical-align: -2px; margin-left: 5px; }

.footer-bottom {
  max-width: calc(var(--container) + 2 * var(--pad-x));
  margin: 0 auto;
  padding: 64px var(--pad-x) 20px;
}
.footer-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 20px;
}

@media (max-width: 899px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .footer-main > div:first-child { grid-column: 1 / -1; }
  .footer-links.cols-2 { columns: 1; }
}
@media (max-width: 479px) {
  .footer-main { grid-template-columns: 1fr; }
  .footer-bottom { padding-top: 40px; }
  .footer-meta { justify-content: flex-start; }
}
/* --------------------------------------------------------------------------
   Responsive: global paddings
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  :root { --pad-x: 20px; --pad-y: 48px; --gap-block: 48px; }
  .lead { font-size: 18px; }
  .body-muted { font-size: 16px; }
  .section-intro { font-size: 16px; margin-bottom: 26px; }
  .page-hero { padding-top: 44px; }
  .univie-logo img { height: 68px; margin: -8px -54px -26px -10px; }
  .footer-main { padding-top: 48px; }
}

/* ==========================================================================
   FOA components (2026-11-04)
   ========================================================================== */

/* Photo credits under figures keep the caption color and a plain underline */
.split-figure figcaption a, .figure figcaption a {
  color: inherit;
  font-weight: 400;
  text-decoration-thickness: 1px;
  text-decoration-color: currentColor;
  text-underline-offset: 2px;
}

/* In-page navigation for long pages */
.subnav {
  padding: 28px var(--pad-x) 0;
  margin-bottom: var(--gap-block);
}
.subnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  font: 600 14px/1 var(--sans);
  color: var(--link);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: background var(--transition), border-color var(--transition);
}
.subnav a:hover { background: var(--link-tint); border-color: var(--link); }

/* Section heads inside long pages */
.section-head { margin-bottom: 40px; }
.section-head h2 { margin-bottom: 12px; }
.section + .section { border-top: 1px solid var(--border); }
.section:not(.section-alt):has(+ .section:not(.section-alt)) { padding-bottom: calc(var(--gap-block) / 2); }
.section:not(.section-alt) + .section:not(.section-alt) { padding-top: calc(var(--gap-block) / 2); }
.section-alt + .section, .section + .section-alt { border-top: 0; }
.subhead {
  margin: 56px 0 18px;
}
.prose p, .prose li { font-size: 17px; line-height: 1.65; color: var(--text-muted); }
.prose ul { padding-left: 1.2em; margin: 0 0 1.25em; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--text); font-weight: 600; }

/* Specification tables (label / value) and data tables */
.spec-table, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  font-variant-numeric: tabular-nums;
}
.spec-table caption, .data-table caption {
  caption-side: top;
  text-align: left;
  font: 600 12px/1.5 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-strong);
}
.spec-table th, .spec-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--border);
}
.spec-table th { font-weight: 400; color: var(--text-muted); width: 48%; }
.spec-table td { color: var(--text); font-weight: 600; }
.data-table thead th {
  text-align: left;
  font: 600 13px/1.4 var(--sans);
  color: var(--text);
  padding: 12px 18px 10px 0;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.data-table td, .data-table tbody th {
  text-align: left;
  vertical-align: top;
  padding: 10px 18px 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.data-table tbody th { color: var(--text); font-weight: 600; white-space: nowrap; }
.table-note {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-faint);
}
.table-wrap + .table-wrap { margin-top: 36px; }
.prose .lead-role { font-size: 12px; line-height: 1.5; color: var(--text-faint); }
.tag-list a { text-decoration: underline; text-underline-offset: 3px; }
.tag-list a:hover { text-decoration-thickness: 2px; }
.split-content .spec-table { margin-top: 8px; }

.spec-grid { align-items: start; }
.spec-grid > * { min-width: 0; }
.spec-table td { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }

/* Text + photo/list head of an instrument card */
.instrument-head {
  align-items: start;
  margin-bottom: 36px;
}
.instrument-head p { font-size: 17px; line-height: 1.65; color: var(--text-muted); }
.instrument-head .figure img { border: 1px solid var(--border); }
@media (max-width: 899px) {
  .instrument-head .figure { max-width: 520px; }
}
.downloads {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font: 600 14px/1.4 var(--sans);
}
.downloads a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.downloads a:hover { text-decoration: underline; text-underline-offset: 3px; }
.downloads svg { display: inline-block; }

.tag-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-list li {
  font: 600 13px/1 var(--sans);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 9px 14px;
}
.tag-list.is-retired li { color: var(--text-faint); border-style: dashed; }

/* Safety rules and status table */
.rules {
  margin: 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  border-top: 1px solid var(--border-strong);
}
.rules dt, .rules dd {
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.rules dt { font-weight: 600; color: var(--text); padding-right: 24px; }
.rules dd { font-size: 16.5px; line-height: 1.6; color: var(--text-muted); }
@media (max-width: 767px) {
  .rules { grid-template-columns: 1fr; }
  .rules dt { border-bottom: 0; padding-bottom: 2px; }
  .rules dd { padding-top: 0; }
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}
.status::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--status, var(--gray-mid));
  box-shadow: 0 0 0 1px rgba(3, 33, 56, 0.25) inset;
}
.status-go   { --status: #a5c56c; }   /* univie Hellgrün */
.status-warn { --status: #ffdc4c; }   /* univie Gelb     */
.status-stop { --status: #e65640; }   /* univie Orangerot */

/* Callout box (important notes) */
.callout {
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  padding: 20px 24px;
  margin: 0 0 32px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-strong);
}
.callout strong { color: var(--text); }

/* Link lists */
.link-group h2 { font-size: 22px; margin-bottom: 14px; }
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.link-list li { border-bottom: 1px solid var(--border); }
.link-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--link);
  text-decoration: none;
}
.link-list a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
.link-list a svg { flex-shrink: 0; display: inline-block; opacity: 0.7; }

/* Key facts (address, coordinates) */
.facts {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 28px;
  font-size: 16px;
}
.facts dt { color: var(--text-faint); }
.facts dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 479px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}

/* History timeline */
.chronology {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.chronology::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--border-strong);
}
.chronology li {
  position: relative;
  padding: 0 0 28px 40px;
}
.chronology li:last-child { padding-bottom: 0; }
.chronology li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  outline: 3px solid var(--bg);
}
.chronology .when {
  display: block;
  font: 600 12px/1.5 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.chronology p { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--text-muted); }
/* The dot's ring takes the color of the section it sits on */
.section-alt .chronology li::before { outline-color: var(--surface-2); }

/* Wide screens: two columns. The second column starts at the item marked
   .col-break (set by hand, so move the class if entries change a lot).
   Instead of one line for the whole list, each item draws the segment from
   its dot down to the next dot, so the last item of each column has none. */
@media (min-width: 1024px) {
  .chronology { columns: 2; column-gap: var(--gap); }
  .chronology::before { display: none; }
  .chronology li { break-inside: avoid; padding-bottom: 0; }
  .chronology li p { padding-bottom: 28px; }
  .chronology li.col-break { break-before: column; }
  .chronology li::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 10px;
    bottom: -10px;
    width: 2px;
    background: var(--border-strong);
  }
  .chronology li:last-child::after,
  .chronology li:has(+ .col-break)::after { display: none; }
  .chronology li::before { z-index: 1; }
}

/* Contact cards */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  padding: 26px 24px 24px;
}
.contact-card :is(h2, h3) { font-size: clamp(1.375rem, 0.4vw + 1.25rem, 1.5625rem); margin-bottom: 4px; }
.contact-card .lead-role { margin-bottom: 14px; }
.contact-card address { font-style: normal; font-size: 16px; line-height: 1.7; color: var(--text-muted); margin-bottom: 12px; }
.lead-role {
  font: 600 12px/1.5 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 12px;
}

.stack > * + * { margin-top: 32px; }

/* Visually hidden (accessible labels) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

@media (max-width: 767px) {
  .subhead { margin-top: 40px; }
}

/* Long German compounds on narrow screens: headings only break at soft
   hyphens (&shy;) placed in the markup. */
h1, h2 { overflow-wrap: break-word; }
@media (max-width: 399px) {
  .site-header { gap: 12px; }
  .header-right { gap: 8px; }
}
/* Portrait photos in split sections are cropped square in CSS (the image
   files stay untouched), so they fill their column like the other photos. */
.split-figure img:is([height="1250"], [height="1194"]) { aspect-ratio: 1; object-fit: cover; }


/* ==========================================================================
   Telescope and instrument pages (2026-11-20)
   Used only by teleskope.html / instrumente.html and their en/ versions.
   Everything here is a new class or a modifier, so other pages are not
   affected. Colors come from the tokens above; white text only on blue.
   ========================================================================== */

/* A section with less vertical padding (overview table, link to the other page) */
.section.section-tight { padding-bottom: var(--gap-block); }

/* Space above a block of tables that follows a text/photo split */
.spec-block { margin-top: 56px; }
.split-content .spec-table + p { margin-top: 28px; }

/* Status badges. The label carries the meaning, the color only supports it.
   current = white on univie blue, planned = blue outline, earlier = gray dashed. */
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  font: 600 12px/1.2 var(--sans);
  letter-spacing: 0.03em;
  white-space: nowrap;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
}
.badge-current { background: var(--blue); color: #fff; }
.badge-earlier { border-color: var(--gray-mid); border-style: dashed; color: var(--gray-mid); }

/* Compact variant of the specification and data tables */
.spec-table.is-dense, .data-table.is-dense { font-size: 14.5px; line-height: 1.45; }
.spec-table.is-dense th, .spec-table.is-dense td,
.data-table.is-dense td, .data-table.is-dense tbody th { padding-top: 7px; padding-bottom: 7px; }
.spec-table.is-dense th { width: 46%; }

/* Key figures of a telescope: large value, small label underneath */
.keyfigs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px var(--gap);
  margin: 4px 0 28px;
  padding: 18px 0;
  border-top: 2px solid var(--border-strong);
  border-bottom: 1px solid var(--border);
}
.keyfigs div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.keyfigs dt { margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--text-muted); hyphens: auto; -webkit-hyphens: auto; }
.keyfigs dd { margin: 0; font: 400 28px/1.1 var(--serif); color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Four figures need about 590 px (one text half at full width); in a
   narrower column they go two by two, so the nowrap values never overlap. */
.split-content:has(> .keyfigs) { container-type: inline-size; }
@container (max-width: 589px) {
  .keyfigs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  .keyfigs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keyfigs dd { font-size: 25px; }
}

/* The three light paths as small cards (name, focal ratio, purpose, status) */
.path-cards {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.path-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-top: 4px solid var(--accent);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  padding: 20px 22px 22px;
}
.path-card.is-earlier { border-top-color: var(--gray-border); }
.path-card h3 { font-size: 21px; margin: 0 0 6px; }
.path-card p { margin: 0 0 16px; font-size: 15.5px; line-height: 1.5; color: var(--text-muted); }
.path-ratio { font-weight: 600; color: var(--text); margin-right: 6px; font-variant-numeric: tabular-nums; }
.path-card .badge { margin-top: auto; }
.path-cards + .spec-block { margin-top: 40px; }
@media (max-width: 767px) {
  .path-cards { margin-top: 32px; }
  .spec-block { margin-top: 36px; }
}

/* Link from one page to the other: one large, clearly clickable row */
.page-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  color: var(--link);
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.page-link:hover { border-color: var(--link); box-shadow: var(--shadow-card-sm); }
.page-link-body { display: block; min-width: 0; }
.page-link-kicker {
  display: block;
  margin-bottom: 6px;
  font: 600 12px/1.5 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.page-link-title { display: block; font: 400 22px/1.25 var(--serif); color: var(--text); }
.page-link-desc { display: block; margin-top: 6px; font-size: 15.5px; line-height: 1.5; color: var(--text-muted); }
.page-link svg { flex-shrink: 0; }
.spec-block + .page-link { margin-top: 40px; }
@media (max-width: 767px) {
  .page-link { padding: 18px 18px; gap: 14px; }
  .page-link-title { font-size: 20px; }
}

/* Instrument cards. Top border: blue for current and planned, gray for
   earlier; the badge tells current and planned apart. */
.inst-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-top: 4px solid var(--accent);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  padding: 32px 40px 40px;
}
.inst-card.is-earlier { border-top-color: var(--gray-border); }
.inst-card + .inst-card { margin-top: 32px; }
.inst-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 20px;
}
.inst-card-head .lead-role { flex: 0 0 100%; margin: 0; }
.inst-card-head h3 { margin: 0; }
.inst-card > p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--text-muted); }
.inst-card .instrument-head { margin-bottom: 32px; }
.inst-card .tag-list { margin-top: 0; }
.inst-pair { margin-top: 32px; }
.inst-pair .inst-card { margin-top: 0; }
@media (max-width: 899px) {
  .inst-card { padding: 26px 24px 28px; }
  .inst-card + .inst-card { margin-top: 24px; }
}
@media (max-width: 479px) {
  .inst-card { padding: 22px 16px 24px; }
  /* Filter table: tighter cells so it fits a phone without scrolling */
  .inst-card .data-table th, .inst-card .data-table td { padding-right: 10px; }
  .inst-card .data-table th:last-child, .inst-card .data-table td:last-child { padding-right: 0; }
  .inst-card .data-table thead th { white-space: normal; hyphens: auto; -webkit-hyphens: auto; }
}
.inst-card .downloads svg { flex-shrink: 0; }

/* Overview table of all instruments. On phones each row becomes a small
   block (name and status on one line, the rest below) instead of scrolling. */
.inst-overview th a { font-weight: 600; }
.inst-overview td { color: var(--text); }
.inst-overview .ov-type { color: var(--text-muted); }
/* Group rows: which telescope the instruments below belong to */
.inst-overview .ov-group th {
  padding: 9px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-strong);
  font: 600 13px/1.4 var(--sans);
  letter-spacing: 0.04em;
  color: var(--text);
}
.inst-overview tbody + tbody .ov-group th { border-top: 14px solid var(--surface); }
.inst-overview .ov-none td { color: var(--text-muted); }
@media (max-width: 639px) {
  .inst-overview, .inst-overview tbody, .inst-overview caption { display: block; }
  .inst-overview thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .inst-overview tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .inst-overview tbody th, .inst-overview tbody td { display: block; padding: 0; border: 0; white-space: normal; }
  .inst-overview tbody th { font-size: 16px; }
  .inst-overview .ov-status { grid-column: 2; grid-row: 1; }
  .inst-overview td:not(.ov-status) { grid-column: 1 / -1; }
  .inst-overview td:empty { display: none; }
  .inst-overview td[data-label]::before { content: attr(data-label) ": "; color: var(--text-muted); }
  .inst-overview tr.ov-group { display: block; padding: 0; border-bottom: 0; }
  .inst-overview tbody .ov-group th { padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--border-strong); }
  .inst-overview tbody + tbody { margin-top: 14px; }
  .inst-overview tbody + tbody .ov-group th { border-top: 0; }
}

/* Tabular figures only for values: in Inter, tnum also widens the hyphen,
   which spaced out labels like "Ritchey-Chrétien". */
.spec-table th, .data-table th { font-variant-numeric: normal; }
/* Spec values mix text and numbers (KAF-1001E, COUNT-50-C-FC): no tnum there. */
.spec-table td { font-variant-numeric: normal; }

/* Clear Outside forecast on the observing page: two-click image. Nothing
   loads from clearoutside.com until the visitor presses the button (see
   site.js). The frame has the shape of the image (672 x 352), so loading it
   does not move the page. The image is shown unaltered and never enlarged. */
.forecast { max-width: 672px; }
.embed-consent {
  display: grid;
  place-items: center;
  aspect-ratio: 672 / 352;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--surface-alt);
  text-align: center;
}
.embed-consent > a, .embed-prompt { margin: 1rem; }
.embed-prompt p { margin: 0 0 0.75rem; color: var(--text-muted); font-size: 15px; }
.embed-consent.is-loaded { display: block; aspect-ratio: auto; background: #fff; }
.embed-consent.is-loaded > a { display: block; margin: 0; }
.embed-consent > a[hidden] { display: none; }
.embed-consent img { display: block; width: 100%; height: auto; border-radius: calc(var(--radius-card) - 1px); }
.embed-status:empty { margin: 0; }
.embed-forget {
  display: inline-flex; align-items: center; min-height: 44px;   /* a 44 px target in the caption line */
  padding: 0; border: 0; background: none; font: inherit; color: inherit;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.embed-forget[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Visit page: lead beside the dates card, two-column offer, location + photo
   -------------------------------------------------------------------------- */
.visit-intro { align-items: start; }
.visit-intro .lead { margin-top: 0; }
.visit-dates, .visit-note { --teaser-bar: var(--orange); }
.visit-dates :is(h2, h3), .visit-note h2 { font-size: clamp(1.375rem, 0.4vw + 1.25rem, 1.5625rem); margin-bottom: 12px; }
.visit-dates p, .visit-note p { font-size: 15.5px; }
.visit-dates p + p { margin-top: 10px; }
.visit-note a { font-weight: 600; }
.visit-dates .visit-status { font-size: 17px; font-weight: 600; color: var(--text); }
.visit-list { list-style: none; margin: 0; padding: 0; }
.visit-list li { padding: 10px 0; border-top: 1px solid var(--border); font-size: 16px; color: var(--text); }
.visit-list li:first-child { border-top: 0; padding-top: 0; }
.visit-list time { font-weight: 600; }
.visit-offer .visit-dates { display: block; margin: 0; }
.prose ol { padding-left: 1.4em; margin: 0 0 1.25em; }
.visit-location .actions { margin-top: 28px; }

/* Home: Figl 2030 project block, text beside an "at a glance" card */
.project-card { --teaser-bar: var(--blue); }
.project-card .facts { gap: 10px 20px; font-size: 15.5px; }
.project-card .facts dd { font-variant-numeric: normal; }

/* News list on the home page */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.news-list li {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 4px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.news-list time { font-weight: 600; color: var(--text-faint); font-size: 14.5px; padding-top: 2px; }
.news-list p { margin: 0; color: var(--text-muted); line-height: 1.55; }
.news-list strong { color: var(--text); }
@media (max-width: 639px) { .news-list li { grid-template-columns: 1fr; } }

/* Wind limits: one block per status on phones instead of a 4-column table */
.wind-limits { margin-top: 48px; }
@media (max-width: 639px) {
  .wind-table, .wind-table tbody, .wind-table tr, .wind-table caption { display: block; }
  .wind-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .wind-table tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .wind-table tbody th, .wind-table td { display: block; padding: 2px 0; border: 0; white-space: normal; }
  .wind-table td[data-label]::before { content: attr(data-label) ": "; color: var(--text-faint); }
}

/* --------------------------------------------------------------------------
   Photo credits: a round (c) button on the photo, as on the univie CMS sites.
   Hover, keyboard focus or a tap shows the credit next to it. Without JS the
   credit is always shown. When hidden it stays in the accessibility tree, so
   screen readers always read it.
   -------------------------------------------------------------------------- */
.photo, .hero-photo { position: relative; }
.photo img { display: block; }
.credit {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  max-width: calc(100% - 20px);
  --focus: #fff;
}
.credit-text {
  min-width: 0;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #fff;
  background: rgba(3, 33, 56, 0.85);
  border-radius: var(--radius-card);
}
.credit-text a {
  color: inherit;
  font-weight: 400;
  text-decoration-thickness: 1px;
  text-decoration-color: currentColor;
  text-underline-offset: 2px;
}
.credit-text a:focus-visible { outline-offset: 1px; }
.credit-btn { display: none; }
.js .credit-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  font: 600 15px/1 var(--sans);
  color: #fff;
  background: var(--navy);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
}
.js .credit-btn:hover { background: var(--blue); }
.js .credit-btn::after { content: ""; position: absolute; inset: -10px; }   /* 44 px touch target: 24 px padding box + 2 × 10 */
.js .credit-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
/* Keyboard focus, and hover with a real pointer, show the credit as well */
.js .credit:not(.is-dismissed):has(:focus-visible) .credit-text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
@media (hover: hover) and (pointer: fine) {
  .js .credit:not(.is-dismissed):hover .credit-text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
}
.js .credit:not(.is-open) .credit-text,
.js .credit.is-dismissed .credit-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


/* ==========================================================================
   Grid system (2026-11-25), after the univie TYPO3 sites (fgga, emerge).
   Last in the file so the single collapse point wins over the component
   rules above. One gutter (--gap) and two alignment lines:
   - the half line (center + 10 px): every two-column block is two equal
     halves, so text columns and cards start there;
   - the outer five-column line: photos beside text span five of twelve
     columns at the outer edge, with one empty column between text (six
     columns, the same width as a half) and photo, as on univie.
   ========================================================================== */
.spec-grid, .visit-intro, .inst-pair, .link-groups, .figure-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px var(--gap);
}
/* Text + photo. In .split the media side is the side of the figure in the
   markup; .split-flip puts it on the right. In .instrument-head the text
   comes first and a photo (.figure) sits on the right; a second text column
   takes the right half instead. */
.split, .instrument-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px var(--gap);
}
.split > * { grid-row: 1; grid-column: 1 / span 5; }
.split > .split-content { grid-column: 7 / span 6; }
.split > .split-content:first-child, .split-flip > .split-content { grid-column: 1 / span 6; }
.split > .split-content:first-child ~ *, .split-flip > :not(.split-content) { grid-column: 8 / span 5; }
.instrument-head > * { grid-row: 1; grid-column: 7 / span 6; }
.instrument-head > :first-child { grid-column: 1 / span 6; }
.instrument-head > .figure { grid-column: 8 / span 5; }

/* Running text: one measure (univie content-md) */
.lead, .body-muted, .section-intro, .prose, .callout, .inst-card > p { max-width: var(--measure); }

@media (max-width: 899px) {
  .split, .spec-grid, .instrument-head, .visit-intro, .inst-pair, .link-groups, .figure-pair,
  .path-cards { grid-template-columns: 1fr; }
  .split > *, .split > .split-content, .split > .split-content:first-child,
  .split > .split-content:first-child ~ *, .split-flip > :is(.split-content, :not(.split-content)),
  .instrument-head > *, .instrument-head > :first-child, .instrument-head > .figure { grid-row: auto; grid-column: auto; }
}

/* --------------------------------------------------------------------------
   Webcams (en/observatory.html #current). Frames land in /live/ via
   upload.php; site.js reads frames.json for the time of each frame.
   -------------------------------------------------------------------------- */
.webcam-intro { margin: 0 0 24px; color: var(--text-muted); }
.webcams { align-items: start; }
.webcam img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;  /* the full 1920 x 1080 frame, watermark included */
  border: 1px solid var(--border-strong);
  background: #202a38;
}
.webcams .figure + .figure { margin-top: 0; }
.webcam.is-stale img { opacity: 0.45; }
.webcam-frame { position: relative; }
.webcam-link { display: block; }   /* opens the full-resolution JPEG (site.js) */
.webcam-link[href] { cursor: zoom-in; }
html[data-night] .webcam-link { pointer-events: none; cursor: default; }   /* red only: no full image at night */
.webcam-time {
  position: absolute; left: 12px; top: 12px; right: 12px; width: fit-content;
  padding: 5px 10px; border-radius: 4px;
  background: rgba(0, 35, 70, 0.88); color: #fff; font-size: 13.5px; line-height: 1.4;
}
.webcam-time[hidden] { display: none; }

/* Table cells whose links must not stack on phones (24 px target spacing) */
td.nowrap { white-space: nowrap; }
