/* C7: Iframe-embeddable public view styles.
   Self-contained — does not share src/shell.css. Keeps the bundle tiny
   for the embed and ensures the iframe is portable into any host page. */

:root {
  --embed-bg: #ffffff;
  --embed-fg: #1a1a1a;
  --embed-fg-muted: #555;
  --embed-accent: #00529b;
  --embed-accent-soft: #e3edf7;
  --embed-rule: #e0dccb;
  --embed-card-bg: #faf8f2;
  --embed-disclosure-bg: #f4f1e8;
  --embed-disclosure-fg: #3a2f00;
  --embed-chip-bg: #ececec;
  --embed-chip-fg: #333;
  --embed-radius: 6px;
  --embed-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --embed-bg: #161616;
    --embed-fg: #f4f4f4;
    --embed-fg-muted: #b8b8b8;
    --embed-accent: #6aa8e5;
    --embed-accent-soft: #1f3a5c;
    --embed-rule: #3d3d3d;
    --embed-card-bg: #1f1f1f;
    --embed-disclosure-bg: #2a230f;
    --embed-disclosure-fg: #f4e9b8;
    --embed-chip-bg: #3a3a3a;
    --embed-chip-fg: #e9e9e9;
  }
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body.embed {
  font-family: var(--embed-font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--embed-fg);
  background: var(--embed-bg);
  hyphens: auto;
  -webkit-hyphens: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:focus-visible {
  outline: 3px solid var(--embed-accent);
  outline-offset: 2px;
  border-radius: var(--embed-radius);
}

.embed__skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--embed-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 0 0 var(--embed-radius) 0;
  z-index: 1000;
}
.embed__skip:focus {
  left: 0;
}

/* ─── Header ──────────────────────────────────────────────────────────── */

.embed__header {
  padding: 1.5rem 1.25rem 0.5rem;
  max-width: 64rem;
  margin: 0 auto;
  width: 100%;
}

.embed__h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.15;
}

.embed__lede {
  margin: 0;
  color: var(--embed-fg-muted);
  font-size: 0.95rem;
}

/* ─── Cards ──────────────────────────────────────────────────────────── */

.embed__main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}

.embed__main:focus {
  outline: none;
}

.embed__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--embed-fg-muted);
  font-style: italic;
}

.embed-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 1.1rem 0.85rem;
  background: var(--embed-card-bg);
  border: 1px solid var(--embed-rule);
  border-radius: var(--embed-radius);
}

.embed-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.embed-card__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.embed-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.embed-card__kategorie,
.embed-card__modalitaet,
.embed-card__coverage {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--embed-accent-soft);
  color: var(--embed-accent);
}

.embed-card__coverage--national {
  background: #f4eaa7;
  color: #5a4a00;
}

@media (prefers-color-scheme: dark) {
  .embed-card__coverage--national {
    background: #5a4a00;
    color: #f4eaa7;
  }
}

.embed-card__coverage-sub {
  opacity: 0.75;
  font-size: 0.9em;
}

.embed-card__excerpt {
  margin: 0;
  font-size: 0.92rem;
  color: var(--embed-fg);
}

.embed-card__details {
  margin-top: 0.25rem;
}

.embed-card__summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--embed-accent);
  font-weight: 600;
  list-style: none;
  padding: 0.2rem 0;
}

.embed-card__summary::-webkit-details-marker {
  display: none;
}

.embed-card__summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.35rem;
  transition: transform 120ms ease;
}

.embed-card__details[open] .embed-card__summary::before {
  transform: rotate(90deg);
}

.embed-card__details-body {
  padding-top: 0.65rem;
  border-top: 1px dashed var(--embed-rule);
  margin-top: 0.4rem;
  font-size: 0.9rem;
}

.embed-card__full {
  margin: 0 0 0.75rem;
}

.embed-card__dl {
  margin: 0;
  display: grid;
  gap: 0.3rem 0.85rem;
}

.embed-card__dl-row {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.85rem;
  align-items: baseline;
}

.embed-card__dl-row dt {
  font-weight: 600;
  color: var(--embed-fg-muted);
}

.embed-card__dl-row dd {
  margin: 0;
  color: var(--embed-fg);
}

.embed-card__chip {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--embed-chip-bg);
  color: var(--embed-chip-fg);
  font-size: 0.82rem;
  margin: 0 0.2rem 0.2rem 0;
}

@media (max-width: 480px) {
  .embed-card__dl-row {
    grid-template-columns: 1fr;
    gap: 0.05rem;
  }
  .embed-card__dl-row dt {
    margin-top: 0.25rem;
  }
}

/* ─── Footer (disclosure stays inside iframe per VISION §Disclosure) ──── */

.embed__footer {
  flex-shrink: 0;
  border-top: 1px solid var(--embed-rule);
  background: var(--embed-disclosure-bg);
  color: var(--embed-disclosure-fg);
}

.embed__disclosure {
  margin: 0;
  padding: 0.65rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  max-width: 64rem;
  margin: 0 auto;
}
