:root {
  --paper: #FAFAF7;
  --paper-raised: #F5F4EE;
  --graphite: #2E3238;
  --graphite-soft: rgba(46, 50, 56, 0.62);
  --graphite-faint: rgba(46, 50, 56, 0.40);
  --hairline: rgba(46, 50, 56, 0.16);
  --hairline-strong: rgba(46, 50, 56, 0.30);

  --steel: #4A6B8A;
  --steel-tint: rgba(74, 107, 138, 0.10);
  --brass: #9C7A3C;
  --brass-tint: rgba(156, 122, 60, 0.10);
  --teal: #3E6363;
  --teal-tint: rgba(62, 99, 99, 0.10);

  --logo-black: #0A0E14;
  --logo-red: #C40C0C;
  --logo-gold: #E0A900;

  --font-sans: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-serif: "IBM Plex Serif", "Source Serif 4", Georgia, serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--graphite);
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.accent-steel { --accent: var(--steel); --accent-tint: var(--steel-tint); }
.accent-brass { --accent: var(--brass); --accent-tint: var(--brass-tint); }
.accent-teal  { --accent: var(--teal);  --accent-tint: var(--teal-tint); }

/* Drafting ruler strip along the very top of the page */
.ruler {
  height: 10px;
  width: 100%;
  background-image: repeating-linear-gradient(
    to right,
    var(--hairline-strong) 0px,
    var(--hairline-strong) 1px,
    transparent 1px,
    transparent 8px
  );
  background-position: 0 0;
  border-bottom: 1px solid var(--hairline);
  opacity: 0.7;
}

/* ---------------- Masthead ---------------- */
.masthead {
  position: relative;
  padding: 30px 20px 22px;
  text-align: center;
  overflow: hidden;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline-strong);
}

.masthead-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 78%);
  pointer-events: none;
}

.masthead-inner {
  position: relative;
}

.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.wordmark-line {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wordmark-dark {
  color: var(--logo-black);
  font-size: 26px;
  margin-bottom: 2px;
}

.wordmark-red {
  color: var(--logo-red);
  font-size: 38px;
  font-weight: 700;
}

.wordmark-bars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 12px 0 10px;
}

.bar {
  height: 3px;
  width: 54px;
  border-radius: 1px;
}

.bar-black { background: var(--logo-black); }
.bar-red   { background: var(--logo-red); }
.bar-gold  { background: var(--logo-gold); }

.tagline {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--graphite);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: inline-block;
}

.dot-black { background: var(--logo-black); }
.dot-gold  { background: var(--logo-gold); }

/* ---------------- Section nav ---------------- */
.section-nav {
  display: flex;
  border-bottom: 1px solid var(--hairline-strong);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-tab {
  flex: 1;
  background: none;
  border: none;
  border-right: 1px solid var(--hairline);
  padding: 12px 6px 10px;
  cursor: pointer;
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--graphite-soft);
  position: relative;
}

.nav-tab:last-child { border-right: none; }

.nav-tab .nav-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  opacity: 0.75;
}

.nav-tab .nav-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-tab[data-section="politik"] { --accent: var(--steel); }
.nav-tab[data-section="wirtschaft_business"] { --accent: var(--brass); }
.nav-tab[data-section="finanzen"] { --accent: var(--teal); }

.nav-tab.is-active {
  color: var(--accent);
}

.nav-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
}

/* ---------------- Layout ---------------- */
#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 48px;
}

.view[hidden] { display: none; }

/* ---------------- Story block (list) ---------------- */
.story {
  position: relative;
  padding: 26px 22px 28px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}

.story::before,
.story::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  opacity: 0.55;
}

.story::before {
  top: 10px;
  left: 8px;
  border-left: 1px solid var(--accent);
  border-top: 1px solid var(--accent);
}

.story::after {
  bottom: 10px;
  right: 8px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
}

.story-ref {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}

.story-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.32;
  color: var(--graphite);
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}

.story-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin: 0 0 12px;
  filter: grayscale(6%);
  border: 1px solid var(--hairline);
}

.story-preview {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--graphite-soft);
  margin: 0 0 4px;
}

.story-more {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.story-more::after { content: " \2192"; }

/* Section intro label above each list */
.section-intro {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 20px 22px 6px;
}

.section-intro .section-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-intro .section-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite-faint);
}

/* ---------------- Article (full) view ---------------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 18px 22px 4px;
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--graphite-soft);
  cursor: pointer;
  padding: 6px 0;
}

.back-arrow { font-size: 13px; }

#articleContent {
  padding: 10px 22px 40px;
  position: relative;
}

#articleContent::before,
#articleContent::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  opacity: 0.55;
}

#articleContent::before {
  top: 2px;
  left: 10px;
  border-left: 1px solid var(--accent);
  border-top: 1px solid var(--accent);
}

#articleContent::after {
  bottom: 8px;
  right: 10px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
}

.article-ref {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

.article-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 25px;
  line-height: 1.3;
  color: var(--graphite);
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin: 0 0 24px;
  border: 1px solid var(--hairline);
}

.article-body p {
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--graphite);
  margin: 0 0 20px;
}

.article-body p.first-para {
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 22px;
}

.article-body p.first-para::first-letter {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 3.4em;
  float: left;
  line-height: 0.82;
  padding-right: 8px;
  margin-top: 4px;
  color: var(--graphite);
}

/* ---------------- Footer ---------------- */
.app-footer {
  padding: 18px 22px 34px;
  text-align: center;
}

.footer-rule {
  height: 1px;
  background: var(--hairline-strong);
  margin-bottom: 14px;
}

.footer-mark {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--graphite-faint);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 380px) {
  .wordmark-red { font-size: 32px; }
  .wordmark-dark { font-size: 22px; }
  .article-title { font-size: 22px; }
}
