/* Alpen Nachrichten: one continuous feed, minty background, single navy accent. */
:root {
  --bg: #E8F1EC;
  --accent: #1E3A5C;
  --ink: #16212d;
  --muted: #4b5d6d;
  --rule: rgba(30, 58, 92, 0.18);
  --white: #ffffff;
  --font-head: "Mulish", "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;
  --feed-max: 560px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

body.no-scroll { overflow: hidden; }

.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;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Masthead: wordmark rebuilt from logo.png ----------
   1 unit = 1 pixel of logo.png (origin at logo x=90, y=365); --u scales it. */
.masthead {
  background: var(--white);
  display: flex;
  justify-content: center;
  padding: 18px var(--gutter) 16px;
  border-bottom: 1px solid var(--rule);
}

.wm {
  --u: calc(min(100vw - 2 * var(--gutter), 440px) / 1120);
  position: relative;
  width: calc(1120 * var(--u));
  height: calc(500 * var(--u));
  color: #03101a;
  font-family: var(--font-head);
  line-height: 1;
  user-select: none;
}

.wm > * { position: absolute; }

.wm-mark {
  left: 0;
  top: calc(5 * var(--u));
  width: calc(440 * var(--u));
  height: calc(290 * var(--u));
  overflow: visible;
}

.wm-pen {
  left: calc(399 * var(--u));
  top: calc(-53 * var(--u));
  font-size: calc(390 * var(--u));
  font-weight: 1000;
  font-style: italic;
  letter-spacing: -0.035em;
  white-space: nowrap;
  background: linear-gradient(180deg, #1d3a52 0%, #06131f 42%, #01070c 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  transform-origin: 0 0;
  padding-right: 0.06em;
  transform: scaleX(0.94);
}

.wm-p {
  display: inline-block;
  clip-path: inset(-10% -10% 0 -10%);
  background: linear-gradient(180deg, #1d3a52 0%, #06131f 35%, #01070c 55%, #c40012 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.wm-rule { top: calc(300 * var(--u)); height: calc(7 * var(--u)); }
.wm-rule--navy {
  left: calc(125 * var(--u)); width: calc(272 * var(--u));
  background: linear-gradient(90deg, #06131f, #1d3a52);
  clip-path: polygon(0 55%, 100% 0, 100% 100%);
}
.wm-rule--red {
  left: calc(490 * var(--u)); width: calc(545 * var(--u));
  background: linear-gradient(90deg, #d40010, #ee1c2c);
  clip-path: polygon(0 0, 100% 55%, 0 100%);
}

.wm-nach {
  left: calc(4 * var(--u));
  top: calc(302 * var(--u));
  font-size: calc(202 * var(--u));
  font-weight: 1000;
  font-style: italic;
  letter-spacing: 0.0em;
  white-space: nowrap;
  background: linear-gradient(180deg, #16202e 0%, #030d16 60%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  transform-origin: 0 0;
  padding-right: 0.06em;
  transform: scaleX(0.775);
}

.wm-tile {
  left: calc(985 * var(--u));
  top: calc(350 * var(--u));
  width: calc(102 * var(--u));
  height: calc(130 * var(--u));
  border-radius: calc(16 * var(--u));
  background: linear-gradient(200deg, #ff3a48 0%, #e5172b 45%, #a80a15 100%);
  transform: skewX(-11.3deg);
  box-shadow: inset 0 calc(-8 * var(--u)) calc(14 * var(--u)) rgba(120, 0, 8, 0.35);
}

.wm-cross {
  position: absolute;
  left: 50%; top: 45%;
  width: calc(68 * var(--u)); height: calc(68 * var(--u));
  transform: translate(-50%, -50%) skewX(11.3deg);
}
.wm-cross::before, .wm-cross::after {
  content: ""; position: absolute; background: #fff; border-radius: calc(3 * var(--u));
}
.wm-cross::before { left: 34%; top: 0; width: 32%; height: 100%; }
.wm-cross::after { left: 0; top: 34%; width: 100%; height: 32%; }

/* ---------- Feed ---------- */
.feed { max-width: var(--feed-max); margin: 0 auto; padding-bottom: 12px; }

.section-head {
  margin: 34px var(--gutter) 6px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.story { position: relative; cursor: pointer; }

.story-title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.22;
  color: var(--accent);
  letter-spacing: -0.005em;
}
.story-title button { display: block; width: 100%; text-align: inherit; }

.story-preview { margin: 8px 0 0; font-size: 15.5px; color: var(--ink); }

.story-more {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
  color: var(--accent);
}
.story-more:hover { text-decoration: underline; text-underline-offset: 3px; }

.story-img { display: block; width: 100%; object-fit: cover; background: #cfdcd5; }

/* Politik: full-bleed image, everything centred beneath it */
.story--politics { padding: 0 0 34px; text-align: center; }
.story--politics .story-img { aspect-ratio: 16 / 9; }
.story--politics .story-body { padding: 18px 22px 0; }
.story--politics .story-title { font-size: 24px; }

/* Wirtschaft: square thumbnail left, text takes the rest */
.story--economy_business {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.story--economy_business .story-img { width: 104px; height: 104px; aspect-ratio: 1 / 1; }
.story--economy_business .story-title { font-size: 19px; }
.story--economy_business .story-preview { font-size: 14.5px; line-height: 1.5; }

/* Finanzen: navy edge bar along the full height of each block */
.story--finance {
  margin: 22px var(--gutter) 0;
  padding: 2px 0 2px 16px;
  border-left: 6px solid var(--accent);
}
.story--finance .story-img { aspect-ratio: 16 / 9; margin-bottom: 12px; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 26px;
  padding: 26px var(--gutter) calc(30px + env(safe-area-inset-bottom));
  text-align: center;
  border-top: 2px solid var(--accent);
}
.footer p { margin: 0; }
.footer-name { font-family: var(--font-head); font-weight: 900; color: var(--accent); font-size: 16px; }
.footer-line { margin-top: 4px; color: var(--muted); font-size: 13.5px; }

/* ---------- Full-screen article overlay ---------- */
.reader[hidden] { display: none; }
.reader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.reader-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px;
  background: var(--accent);
  color: #fff;
}
.reader-kicker {
  font-family: var(--font-head); font-weight: 900; font-size: 12.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.reader-close {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 12px;
  background: #fff; color: var(--accent);
  font-family: var(--font-head); font-weight: 800; font-size: 15px;
  border-radius: 999px;
}
.reader-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.reader-close-x { font-size: 24px; line-height: 1; margin-top: -2px; }

.reader-article { max-width: 680px; margin: 0 auto; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
.reader-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #cfdcd5; }
.reader-title {
  margin: 22px var(--gutter) 14px;
  font-family: var(--font-head); font-weight: 900; font-size: 27px; line-height: 1.2;
  color: var(--accent);
}
.reader-text { padding: 0 var(--gutter); font-size: 17px; line-height: 1.65; }
.reader-text p { margin: 0 0 1.05em; }

@media (min-width: 640px) {
  .story--politics .story-title { font-size: 28px; }
  .reader-title { font-size: 34px; }
}
