/* ==========================================================================
   Weber-Raumformel — Wissenschaftliche Ausgabe
   Akademisches Arbeitspapier-Design: helles Papier, Serifen, Navy-Akzent.
   Eigenständiges Stylesheet — unabhängig von ../css/style.css.
   ========================================================================== */

:root {
  /* Papier & Tinte */
  --paper: #fcfcfa;
  --paper-panel: #f4f4ef;
  --ink: #1c2430;
  --ink-soft: #3d4859;
  --ink-muted: #6b7480;

  /* Akademisches Navy */
  --navy: #16365c;
  --navy-deep: #0e2440;
  --link: #1a4d8f;

  --rule: #c9cdd4;
  --rule-soft: #e3e5e8;

  /* Typografie — gleiche Google-Fonts wie die Hauptseite */
  --serif: "Newsreader", "Times New Roman", Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --measure: 76ch;       /* Lesebreite des Fließtexts */
  --page-max: 920px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--serif);
  font-size: 1.075rem;
  line-height: 1.72;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Skip-Link ---------------------------------------------------------------- */
.skip-link { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus {
  position: fixed; left: 16px; top: 16px; width: auto; height: auto;
  padding: 10px 16px; background: var(--navy); color: #fff; z-index: 9999;
  font-family: var(--sans); border-radius: 3px;
}

:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

/* Institutsleiste ----------------------------------------------------------- */
.inst-bar {
  background: var(--navy-deep);
  color: #cdd8e6;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.inst-bar .wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.inst-bar a { color: #e8eef6; text-decoration: none; border-bottom: 1px solid rgba(232,238,246,0.4); }
.inst-bar a:hover { border-bottom-color: #fff; color: #fff; }

/* Masthead (Kopf wie eine Fachzeitschrift) ---------------------------------- */
.masthead {
  max-width: var(--page-max);
  margin: 0 auto;
  width: 100%;
  padding: 30px 24px 0;
}
.masthead-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  letter-spacing: 0.01em;
  color: var(--navy);
  text-align: center;
}
.masthead-title a { color: inherit; text-decoration: none; }
.masthead-sub {
  text-align: center;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 6px;
}

.uni-nav {
  max-width: var(--page-max);
  margin: 18px auto 0;
  width: 100%;
  padding: 0 24px;
}
.uni-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 28px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 10px 0;
}
.uni-nav a {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 2px 0;
}
.uni-nav a:hover { color: var(--navy); }
.uni-nav a.active {
  color: var(--navy);
  font-weight: 600;
  border-bottom: 2px solid var(--navy);
}

/* Seitenkörper --------------------------------------------------------------- */
.paper {
  max-width: var(--page-max);
  margin: 0 auto;
  width: 100%;
  padding: 44px 24px 70px;
  flex: 1 0 auto;
}

/* Titelblock eines Arbeitspapiers */
.doc-eyebrow {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
}
.doc-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.45rem);
  line-height: 1.22;
  text-align: center;
  color: var(--ink);
  margin: 14px auto 0;
  max-width: 30ch;
}
.doc-subtitle {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 14px auto 0;
  font-size: 1.05rem;
}
.doc-byline {
  text-align: center;
  margin-top: 22px;
  font-size: 0.98rem;
  color: var(--ink-soft);
}
.doc-byline .author { font-variant: small-caps; letter-spacing: 0.06em; font-size: 1.08rem; color: var(--ink); }
.doc-meta-line {
  text-align: center;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 6px;
}

/* Ehrlicher Status-Hinweis — zentral für die Glaubwürdigkeit */
.status-note {
  max-width: 70ch;
  margin: 28px auto 0;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--navy);
  background: var(--paper-panel);
  padding: 12px 18px;
  font-family: var(--sans);
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.status-note strong { color: var(--navy); }

/* Abstract */
.abstract {
  max-width: 66ch;
  margin: 40px auto 0;
  padding: 0 8px;
}
.abstract h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  margin-bottom: 14px;
}
.abstract p { font-size: 0.98rem; line-height: 1.7; text-align: justify; hyphens: auto; }
.abstract .keywords {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.abstract .keywords strong { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* Trennornament */
.orn {
  text-align: center;
  color: var(--ink-muted);
  margin: 44px 0;
  letter-spacing: 0.8em;
  font-size: 0.9rem;
}

/* Fließtext ------------------------------------------------------------------ */
.body-text { max-width: var(--measure); margin: 0 auto; }

.body-text h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.42rem;
  color: var(--navy);
  margin: 52px 0 16px;
  line-height: 1.3;
}
.body-text h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink);
  margin: 30px 0 10px;
}
.body-text h4 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  margin: 24px 0 8px;
}
.body-text p { margin-bottom: 16px; }
.body-text ul, .body-text ol { margin: 0 0 18px 26px; }
.body-text li { margin-bottom: 8px; }
.body-text a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.body-text a:hover { color: var(--navy-deep); }

.body-text blockquote {
  border-left: 3px solid var(--navy);
  padding: 6px 0 6px 22px;
  margin: 26px 0;
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink-soft);
}
.body-text blockquote small { font-style: normal; font-family: var(--sans); font-size: 0.8rem; color: var(--ink-muted); }

hr.section-divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 56px auto;
  max-width: var(--measure);
}

/* Formeln (Gleichungssatz) ---------------------------------------------------- */
.formula-display {
  position: relative;
  background: var(--paper-panel);
  border: 1px solid var(--rule-soft);
  padding: 20px 64px 20px 24px;
  margin: 22px 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.9;
  color: var(--ink);
  overflow-x: auto;
}
.formula-display .eq-no {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.92rem;
  color: var(--ink-muted);
  font-style: normal;
}
.formula-display--highlight { border-color: var(--navy); border-width: 1.5px; }
.formula-caption {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 10px;
  line-height: 1.5;
}

/* Inhaltsverzeichnis ----------------------------------------------------------- */
.toc {
  max-width: var(--measure);
  margin: 0 auto 10px;
  border: 1px solid var(--rule);
  padding: 22px 28px;
  background: #fff;
}
.toc h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--ink);
}
.toc ol { list-style: none; columns: 2; column-gap: 40px; }
.toc li { margin-bottom: 7px; font-size: 0.93rem; break-inside: avoid; }
.toc .toc-no { color: var(--ink-muted); font-family: var(--sans); font-size: 0.82rem; margin-right: 8px; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--navy); text-decoration: underline; }

/* Dokument-Metadaten & Zitiervorschlag ----------------------------------------- */
.doc-info {
  max-width: var(--measure);
  margin: 40px auto;
  font-family: var(--sans);
  font-size: 0.88rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.doc-info dl {
  display: grid;
  grid-template-columns: 180px 1fr;
}
.doc-info dt {
  padding: 9px 12px 9px 2px;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule-soft);
  letter-spacing: 0.03em;
}
.doc-info dd {
  padding: 9px 0 9px 12px;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
}
.doc-info dt:last-of-type, .doc-info dd:last-of-type { border-bottom: none; }

.cite-box {
  max-width: var(--measure);
  margin: 30px auto;
  background: var(--paper-panel);
  border: 1px solid var(--rule);
  padding: 18px 22px;
}
.cite-box h3 {
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
}
.cite-box p { font-size: 0.92rem; line-height: 1.6; color: var(--ink-soft); }

/* Karten / Übersicht auf der Startseite ----------------------------------------- */
.index-grid {
  max-width: var(--measure);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.index-card {
  border: 1px solid var(--rule);
  background: #fff;
  padding: 22px 24px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.index-card:hover { border-color: var(--navy); box-shadow: 0 2px 10px rgba(22, 54, 92, 0.08); }
.index-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; color: var(--navy); margin-bottom: 8px; }
.index-card p { font-size: 0.92rem; line-height: 1.6; color: var(--ink-soft); }
.index-card .card-tag {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 10px;
}

/* Abbildung -------------------------------------------------------------------- */
.figure {
  max-width: var(--measure);
  margin: 36px auto;
}
.figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
}

/* Animierte Abbildung (figur.js) — Schemazeichnung im Publikations-Stil */
.fig-stage {
  position: relative;
  border: 1px solid var(--rule);
  background: #fff;
}
.fig-stage .fig-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 2;
  cursor: crosshair;
  touch-action: pan-y; /* vertikales Scrollen auf Touch bleibt möglich */
}
.fig-stage noscript img { border: none; }
@media (max-width: 640px) {
  .fig-stage .fig-canvas { aspect-ratio: 16 / 10; }
}
.figure figcaption {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 10px;
  line-height: 1.55;
}
.figure figcaption strong { color: var(--ink-soft); }

/* Forschungsstand: Stufen --------------------------------------------------------- */
.stage {
  max-width: var(--measure);
  margin: 0 auto 26px;
  border: 1px solid var(--rule);
  background: #fff;
  padding: 24px 28px;
}
.stage-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.stage-head h2 { margin: 0 !important; }
.stage-badge {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid currentColor;
}
.stage-badge--done    { color: #1e6b3a; background: #eef7f0; }
.stage-badge--active  { color: var(--navy); background: #eef3fa; }
.stage-badge--planned { color: var(--ink-muted); background: var(--paper-panel); }
.stage ul { list-style: none; margin-left: 0 !important; }
.stage li { padding-left: 26px; position: relative; font-size: 0.96rem; }
.stage li::before { position: absolute; left: 0; font-family: var(--sans); }
.stage li.done::before    { content: "✓"; color: #1e6b3a; }
.stage li.active::before  { content: "▸"; color: var(--navy); }
.stage li.open::before,
.stage li.planned::before { content: "○"; color: var(--ink-muted); }

/* Kontaktformular ------------------------------------------------------------------ */
.uni-form { max-width: 560px; }
.uni-form .form-group { margin-bottom: 18px; }
.uni-form label {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  color: var(--ink);
}
.uni-form input, .uni-form textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
}
.uni-form input:focus, .uni-form textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.uni-form textarea { min-height: 160px; resize: vertical; }
.uni-btn {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
  padding: 12px 28px;
  cursor: pointer;
}
.uni-btn:hover { background: var(--navy-deep); }
.uni-btn:disabled { opacity: 0.6; cursor: wait; }
.uni-btn--ghost { background: transparent; color: var(--navy); }
.uni-btn--ghost:hover { background: var(--paper-panel); }
.form-status { margin-top: 14px; font-family: var(--sans); font-size: 0.9rem; }
.form-status.success { color: #1e6b3a; }
.form-status.error { color: #9b2226; }

/* Fußzeile -------------------------------------------------------------------------- */
.uni-footer {
  border-top: 1px solid var(--ink);
  margin-top: auto;
}
.uni-footer .wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 22px 24px 30px;
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.uni-footer a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); }
.uni-footer a:hover { color: var(--navy); border-bottom-color: var(--navy); }
.uni-footer .legal { display: flex; gap: 18px; flex-wrap: wrap; }

/* Responsiv -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  body { font-size: 1.02rem; }
  .toc ol { columns: 1; }
  .doc-info dl { grid-template-columns: 1fr; }
  .doc-info dt { border-bottom: none; padding-bottom: 0; }
  .formula-display { padding: 16px 18px 38px; }
  .formula-display .eq-no { top: auto; bottom: 10px; transform: none; }
}

/* Druck — Arbeitspapier soll sauber ausdruckbar sein ---------------------------------- */
@media print {
  .inst-bar, .uni-nav, .uni-footer .legal, .skip-link { display: none; }
  body { background: #fff; font-size: 11pt; }
  .paper { padding: 0; max-width: none; }
  .formula-display { background: #fff; border: 1px solid #999; }
  a { color: inherit; text-decoration: none; }
}
