/* ═══════════════════════════════════════════════════════════════
   gr-tier-4.css — Tier 4 anchor-article styles.

   Loaded by:
     /tier-4/index.html and /tier-4/<slug>.html (full page chrome + tier-4 specific)
     /theater/<slug>.html (anchor-card styles only — theater pages use their own
       inlined nav/footer/body CSS, so the .site-nav / .cmd-footer / body-reset
       rules below are no-ops there).
═══════════════════════════════════════════════════════════════ */

/* ─── Base reset (mirrors gr-dashboard.css; only active on /tier-4/ pages) ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--navy-1);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.overline {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ═══════════════════════════════════════════════════
   NAVIGATION (extracted; matches gr-dashboard.css)
═══════════════════════════════════════════════════ */
.site-nav { position: sticky; top: 0; z-index: 100; background: var(--navy-0); border-bottom: 1px solid var(--border); }
.nav-inner { display: grid; grid-template-columns: 200px 1fr 220px; height: 60px; }
.nav-brand { display: flex; align-items: center; padding: 0 22px; border-right: 1px solid var(--border); }
.nav-brand img { height: 28px; width: auto; mix-blend-mode: screen; }
.nav-links { display: flex; align-items: center; padding: 0 28px; gap: 32px; }
.nav-links a { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text-1); }
.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 0 22px; border-left: 1px solid var(--border); }
.nav-date { font-size: 10px; font-weight: 500; letter-spacing: 0.10em; color: var(--text-3); font-variant-numeric: tabular-nums; }
.nav-subscribe { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); border: 1px solid var(--cyan-dim); padding: 7px 14px; transition: background 0.2s, color 0.2s; }
.nav-subscribe:hover { background: var(--cyan); color: var(--navy-0); }

/* ═══════════════════════════════════════════════════
   FOOTER (extracted; matches gr-dashboard.css)
═══════════════════════════════════════════════════ */
.cmd-footer { background: var(--navy-0); border-top: 1px solid var(--border); margin-top: 96px; }
.footer-direction { padding: 18px 52px; border-bottom: 1px solid var(--border); font-size: 9px; font-weight: 600; letter-spacing: 0.20em; text-transform: uppercase; color: var(--text-3); }
.footer-nav { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 0; border-bottom: 1px solid var(--border); }
.footer-col { padding: 44px 36px; border-right: 1px solid var(--border); }
.footer-col:last-child { border-right: none; }
.footer-brand { display: flex; align-items: flex-start; flex-direction: column; }
.footer-logo { height: 26px; margin-bottom: 18px; mix-blend-mode: screen; }
.footer-mission { font-size: 12px; color: var(--text-3); line-height: 1.7; max-width: 260px; margin-bottom: 24px; }
.footer-nav-title { font-size: 9px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.footer-nav-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-nav-links a { font-size: 12px; color: var(--text-2); transition: color 0.15s; }
.footer-nav-links a:hover { color: var(--text-1); }
.footer-lower { display: flex; align-items: center; justify-content: space-between; padding: 16px 52px; }
.footer-legal { font-size: 10px; color: var(--text-3); letter-spacing: 0.06em; }
.footer-classif { font-size: 9px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--border); padding: 4px 10px; }

/* ═══════════════════════════════════════════════════
   ANCHOR CARD — shared component
   Used on: library page gallery, theater pages (injected by JS),
   landing-page cross-references (variant: --cross-ref).
═══════════════════════════════════════════════════ */
.anchor-card {
  display: block;
  background: var(--navy-2);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  overflow: hidden;
  position: relative;
}
.anchor-card:hover {
  background: var(--navy-3);
  border-color: var(--border-lt);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.32);
}
.anchor-card picture,
.anchor-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.anchor-card-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.anchor-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.anchor-card-type {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  border: 1px solid var(--cyan-dim);
  padding: 3px 8px;
}
.anchor-card-theater {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-3);
}
.anchor-card-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--text-1);
  margin: 4px 0 0;
}
.anchor-card-abstract {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-3);
  margin-top: 8px;
}

/* Cross-reference variant — smaller, denser */
.anchor-card--cross-ref .anchor-card-body { padding: 14px 16px; gap: 6px; }
.anchor-card--cross-ref .anchor-card-title { font-size: 15px; }
.anchor-card--cross-ref .anchor-card-abstract { display: none; }

/* ═══════════════════════════════════════════════════
   LIBRARY PAGE
═══════════════════════════════════════════════════ */
.library-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 36px 72px;
}
.library-hero {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.library-hero .overline { color: var(--cyan-dim); margin-bottom: 14px; }
.library-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--text-1);
  margin-bottom: 18px;
}
.library-intro {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 780px;
}

.library-controls {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  gap: 14px;
  margin-bottom: 32px;
  align-items: end;
}
.library-control { display: flex; flex-direction: column; gap: 6px; }
.library-control label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.library-controls input,
.library-controls select {
  background: var(--navy-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.library-controls input:focus,
.library-controls select:focus { border-color: var(--cyan-dim); background: var(--navy-3); }
.library-controls input::placeholder { color: var(--text-3); }
.library-reset {
  background: transparent;
  border: 1px solid var(--border-lt);
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 16px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  align-self: end;
  height: fit-content;
}
.library-reset:hover { color: var(--cyan); border-color: var(--cyan-dim); }

.library-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.library-empty {
  text-align: center;
  color: var(--text-3);
  padding: 32px 0;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════
   LANDING PAGE
═══════════════════════════════════════════════════ */
.anchor-page {
  background: var(--navy-1);
}
.anchor-hero {
  position: relative;
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.anchor-hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.anchor-hero-image picture,
.anchor-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.anchor-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 22, 40, 0.55) 0%,
    rgba(10, 22, 40, 0.78) 60%,
    rgba(10, 22, 40, 0.95) 100%
  );
  pointer-events: none;
}
.anchor-hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 88px 36px 56px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.anchor-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.anchor-hero-theater {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  border-bottom: 1px dotted var(--cyan-dim);
  padding-bottom: 1px;
  transition: color 0.15s;
}
.anchor-hero-theater:hover { color: var(--text-1); }
.anchor-hero-type {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--border-lt);
  padding: 4px 10px;
}
.anchor-hero-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: var(--text-1);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.anchor-hero-published {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.anchor-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 36px 32px;
}
.back-link {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  margin-bottom: 32px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--cyan); }

.anchor-section {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-dim);
}
.anchor-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.anchor-section h2 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-1);
  border-left: 4px solid var(--cyan-dim);
  padding-left: 12px;
  margin-bottom: 18px;
}
.anchor-section--abstract p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-2);
}
.anchor-variables {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.anchor-variables li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}
.anchor-variables li::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cyan-dim);
  font-size: 12px;
  line-height: 1.6;
}

/* Download CTA */
.anchor-section--download { background: rgba(74, 176, 204, 0.04); padding: 22px 24px 26px; border-radius: 0; }
.anchor-section--download h2 { margin-bottom: 16px; }
.anchor-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--cyan);
  color: var(--navy-0);
  padding: 14px 22px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  border: 1px solid var(--cyan);
}
.anchor-download-btn:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--navy-0);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(74, 176, 204, 0.22);
}
.anchor-download-icon { font-size: 18px; line-height: 1; }
.anchor-download-label { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; line-height: 1.2; }
.anchor-download-action { font-size: 12px; }
.anchor-download-meta { font-size: 9px; opacity: 0.7; letter-spacing: 0.10em; }
.anchor-download-note { margin-top: 10px; font-size: 11px; color: var(--text-3); font-style: italic; }

/* Cross-references grid */
.anchor-xref-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* Citation footer */
.anchor-section--footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.anchor-citation { font-size: 11px; color: var(--text-3); letter-spacing: 0.04em; }
.anchor-footer-link { font-size: 11px; color: var(--cyan-dim); font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; }
.anchor-footer-link:hover { color: var(--cyan); }

/* ═══════════════════════════════════════════════════
   THEATER PAGE — Anchor Articles section
   (rendered into a [data-theater-anchor-articles] container by
   /assets/js/anchor-articles-cards.js)
═══════════════════════════════════════════════════ */
.anchor-articles-section {
  padding: 56px 36px 48px;
  border-bottom: 1px solid var(--border);
  background: var(--navy-1);
}
.anchor-articles-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.anchor-articles-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.anchor-articles-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-1);
  border-left: 4px solid var(--cyan-dim);
  padding-left: 12px;
}
.anchor-articles-library-link {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  transition: color 0.15s;
}
.anchor-articles-library-link:hover { color: var(--cyan); }
.anchor-articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.anchor-articles-empty {
  font-size: 13px;
  color: var(--text-3);
  font-style: italic;
}

/* Master-thesis header pill — appears in a theater page's hero block when
   that theater has a master thesis published. Injected by JS. */
.theater-master-thesis-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--cyan-dim);
  padding: 7px 14px;
  margin-top: 14px;
  transition: background 0.18s, color 0.18s;
}
.theater-master-thesis-link:hover { background: var(--cyan); color: var(--navy-0); }
.theater-master-thesis-link::before { content: '§'; opacity: 0.85; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .library-gallery { grid-template-columns: repeat(2, 1fr); }
  .library-controls { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .library-controls .library-control--search { grid-column: span 3; }
  .library-reset { grid-column: span 3; justify-self: start; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .anchor-articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-inner { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .library-page { padding: 40px 22px 56px; }
  .library-gallery { grid-template-columns: 1fr; }
  .library-controls { grid-template-columns: 1fr; }
  .library-controls .library-control--search,
  .library-reset { grid-column: span 1; }
  .anchor-hero-content { padding: 64px 22px 40px; }
  .anchor-body { padding: 40px 22px; }
  .anchor-xref-grid { grid-template-columns: 1fr; }
  .anchor-articles-section { padding: 40px 22px; }
  .anchor-articles-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr; }
  .footer-col { border-right: none; }
  .footer-lower { flex-direction: column; gap: 10px; text-align: center; padding: 16px 22px; }
}
