/* ems-check.de – Basis-Styles. Keine externen Fonts (DSGVO). */
:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #eef2f0;
  --border: #dbe2de;
  --text: #15201b;
  --muted: #5b6b63;
  --accent: #0b8a64;
  --accent-ink: #076b4d;
  --accent-soft: #e2f3ec;
  --yes: #0b8a64;
  --partial: #b7791f;
  --no: #c2410c;
  --open: #9aa7a0;
  --verified: #0b8a64;
  --researched: #2563eb;
  --researched-soft: #e6eefc;
  --shadow: 0 1px 2px rgba(16, 32, 24, .06), 0 4px 16px rgba(16, 32, 24, .05);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1513;
    --surface: #161e1b;
    --surface-2: #1d2824;
    --border: #2a3832;
    --text: #e6eeea;
    --muted: #9bb0a6;
    --accent: #2fbf8f;
    --accent-ink: #5fd6ad;
    --accent-soft: #173229;
    --yes: #2fbf8f;
    --partial: #e0a540;
    --no: #f07a4a;
    --open: #5f706a;
    --verified: #2fbf8f;
    --researched: #7aa7ff;
    --researched-soft: #1a2640;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: var(--accent-ink); }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); letter-spacing: -.02em; }
h2 { font-size: 1.4rem; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: 1.15rem; font-weight: 600; }
.logo b { color: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--accent-ink); background: var(--accent-soft); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); padding: 6px; cursor: pointer; }
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px 12px; }
  .nav.open { display: flex; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 28px 0; background: var(--surface); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 16px; }

/* Sections */
.section { padding: 40px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head { padding: 36px 0 12px; }
.page-head p { color: var(--muted); max-width: 70ch; }

/* Hero */
.hero { padding: 56px 0 32px; background: linear-gradient(180deg, var(--accent-soft), var(--bg)); }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.search { position: relative; max-width: 640px; margin-top: 20px; }
.search input[type=search] { width: 100%; font: inherit; padding: 14px 16px 14px 44px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); list-style: none; margin: 0; padding: 6px; z-index: 4; }
.suggest a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.suggest a:hover, .suggest a.hl { background: var(--surface-2); }
.suggest .type { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-size: .9rem; cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; max-width: 640px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.card h3 { margin: 0; }
.card h3 a { text-decoration: none; color: var(--text); }
.card h3 a:hover { color: var(--accent-ink); }
.card .vendor { color: var(--muted); font-size: .9rem; margin-top: -6px; }
.card p { margin: 0; font-size: .92rem; color: var(--muted); }
.card p.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .78rem; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent-ink); }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.step .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; margin-bottom: 8px; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 500; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--accent-ink); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
select, input[type=search], input[type=text] { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); width: 100%; }
label.check { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; cursor: pointer; font-size: .92rem; }
label.check input { margin-top: 4px; accent-color: var(--accent); }

/* Compare layout */
.compare-layout { display: grid; grid-template-columns: 290px 1fr; gap: 24px; align-items: start; }
.compare-layout > * { min-width: 0; }
.filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; }
.filters h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 6px; }
.filters h3:first-child { margin-top: 0; }
.filters details { border-top: 1px solid var(--border); padding: 6px 0; }
.filters summary { cursor: pointer; font-weight: 600; padding: 6px 0; font-size: .95rem; }
.filters .field { margin-bottom: 8px; }
.filters .field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 2px; }
.filter-toggle { display: none; }
@media (max-width: 900px) {
  .compare-layout { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; }
  .filter-toggle { display: inline-flex; }
}
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.result-list { display: flex; flex-direction: column; gap: 12px; }
.result { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.result h3 { margin: 0; font-size: 1.05rem; }
.result h3 a { color: var(--text); text-decoration: none; }
.result h3 a:hover { color: var(--accent-ink); }
.result .meta { color: var(--muted); font-size: .88rem; }
.result .score { text-align: right; font-size: .85rem; color: var(--muted); min-width: 110px; }
.result .score b { color: var(--text); font-size: 1.1rem; }
@media (max-width: 560px) {
  .result { grid-template-columns: auto 1fr; }
  .result .score { grid-column: 2; text-align: left; }
}
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }

.compare-tray { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 10px 0; margin-top: 24px; box-shadow: 0 -4px 16px rgba(0,0,0,.06); z-index: 3; }
.compare-tray .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th { background: var(--surface-2); font-weight: 600; position: sticky; top: 0; z-index: 1; }
tr.group th { background: var(--accent-soft); color: var(--accent-ink); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:last-child td { border-bottom: 0; }
td.c, th.c { text-align: center; }
.sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 2; min-width: 200px; }
thead .sticky-col { background: var(--surface-2); z-index: 3; }
@media (max-width: 560px) { .sticky-col { min-width: 130px; } th, td { padding: 8px; } }

/* Matrix */
.matrix-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.matrix-controls .field { min-width: 200px; }
.matrix-controls label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 2px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.matrix td.c { min-width: 110px; }
.matrix th.ems-col { text-align: center; min-width: 110px; }
.matrix th.ems-col a { color: var(--text); text-decoration: none; }
.matrix th.ems-col a:hover { color: var(--accent-ink); }
.cell-yes { color: var(--yes); font-weight: 600; cursor: help; text-decoration: none; }
.cell-proto { display: block; font-size: .72rem; color: var(--muted); font-weight: 400; }

/* Values & status */
.v { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; white-space: nowrap; }
.v svg { flex: none; }
.v-yes { color: var(--yes); }
.v-partial { color: var(--partial); }
.v-no { color: var(--no); }
.v-open { color: var(--open); font-weight: 400; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.badge-verified { background: var(--accent-soft); color: var(--verified); }
.badge-researched { background: var(--researched-soft); color: var(--researched); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .85rem; color: var(--muted); margin: 8px 0 16px; align-items: center; }
.note { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
sup.src { font-size: .7rem; }
sup.src a { text-decoration: none; }

/* Detail page */
.detail-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; padding: 36px 0 8px; }
@media (max-width: 720px) { .detail-head { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.fact dt { font-size: .8rem; color: var(--muted); }
.fact dd { margin: 2px 0 0; font-weight: 500; }
.toc { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; }
.compat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.compat-grid .card ul { margin: 0; padding: 0; list-style: none; }
.compat-grid .card li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.compat-grid .card li:last-child { border-bottom: 0; }
.sources { font-size: .88rem; padding-left: 1.4em; }
.sources li { margin-bottom: 4px; word-break: break-word; }
.callout { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 14px 16px; margin: 16px 0; }
.prose { max-width: 75ch; }
.prose h2 { margin-top: 1.6em; }
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 20px; }
.crumbs a { color: var(--muted); }
