/* suchmaschinen-video.de · Design „Röntgenblick“ · keine externen Ressourcen */
:root {
  --bg: #05071a;
  --bg-2: #0a0f2c;
  --bg-3: #111842;
  --line: rgba(92, 242, 255, 0.22);
  --text: #e7ecff;
  --muted: #aab4e6;
  --cyan: #5cf2ff;
  --violet: #a78bfa;
  --ok: #4ade80;
  --warn: #fbbf24;
  --fail: #f87171;
  --info: #93c5fd;
  --radius: 14px;
  --max: 72rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: radial-gradient(120% 80% at 15% -10%, #1b2b6b 0%, var(--bg-2) 45%, var(--bg) 100%) fixed;
  min-height: 100vh;
}
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
kbd { font-family: var(--mono); font-size: 0.85em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0.05em 0.4em; background: var(--bg-3); }
code { font-family: var(--mono); font-size: 0.92em; background: rgba(92, 242, 255, 0.08); padding: 0.1em 0.35em; border-radius: 5px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--cyan); color: var(--bg); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* Kopfbereich */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(5, 7, 26, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; letter-spacing: 0.06em; color: var(--text); text-decoration: none; font-size: 0.95rem; }
.brand-dot { color: var(--cyan); }
.site-nav { margin-right: auto; }
.lesson-menu summary { cursor: pointer; list-style: none; padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.9rem; }
.lesson-menu summary::-webkit-details-marker { display: none; }
.lesson-menu[open] summary { color: var(--text); border-color: var(--cyan); }
.lesson-menu-panel { position: absolute; margin-top: 0.6rem; width: min(22rem, 92vw); max-height: 75vh; overflow: auto; padding: 1rem 1.2rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.menu-block { margin: 0.6rem 0 0.2rem; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--violet); }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list a { display: block; padding: 0.3rem 0.4rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.menu-list a:hover, .menu-list a[aria-current="page"] { background: rgba(92, 242, 255, 0.1); color: var(--cyan); }
.num { font-family: var(--mono); color: var(--cyan); margin-right: 0.35rem; }

.controls { display: flex; gap: 0.5rem; align-items: center; }
.controls[hidden] { display: none; }
.switch, .btn-beamer { font: inherit; font-size: 0.85rem; cursor: pointer; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: rgba(255, 255, 255, 0.04); }
.switch { display: inline-flex; padding: 3px; }
.switch span { padding: 0.3rem 0.75rem; border-radius: 999px; }
.switch[aria-checked="false"] .switch-human, .switch[aria-checked="true"] .switch-bot { background: var(--cyan); color: var(--bg); font-weight: 700; }
.btn-beamer { padding: 0.35rem 0.9rem; }
.btn-beamer[aria-pressed="true"] { background: var(--violet); color: var(--bg); font-weight: 700; }

/* Inhalt */
main { max-width: var(--max); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 4vw, 2.5rem) 4rem; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; overflow-wrap: break-word; hyphens: auto; }
p, li, dd, td { overflow-wrap: break-word; }
p code, li code, td code, dd code { overflow-wrap: anywhere; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 850; margin: 0.2rem 0 1rem; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 2.8rem 0 0.9rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 0.6rem; }
.glow { background: linear-gradient(90deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); letter-spacing: 0.04em; margin: 0; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 46rem; }
.hero { padding: 2rem 0 1rem; }
.xray-hint { display: inline-block; padding: 0.6rem 0.9rem; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 0.95rem; }

.card-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.card a { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 1.2rem 1.25rem; text-decoration: none; color: var(--text); background: linear-gradient(180deg, rgba(17, 24, 66, 0.9), rgba(10, 15, 44, 0.9)); border: 1px solid var(--line); border-radius: var(--radius); transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
.card a:hover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: 0 0 30px rgba(92, 242, 255, 0.15); }
.card-title { font-weight: 750; font-size: 1.1rem; }
.card-text { color: var(--muted); font-size: 0.95rem; }

.lesson { max-width: 52rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 1.2rem; font-size: 0.9rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; color: var(--violet); }
.live, .demo, .note, .myth { padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(10, 15, 44, 0.75); margin: 1.5rem 0; }
.live h2, .note h2, .myth h2 { margin-top: 0.2rem; }
.rules li { margin: 0.35rem 0; }
.myth dt { font-weight: 700; color: var(--warn); margin-top: 0.8rem; }
.myth dd { margin: 0.2rem 0 0; }
.sources { font-size: 0.95rem; color: var(--muted); }
.checked { font-family: var(--mono); font-size: 0.85rem; }
.codeblock { font-family: var(--mono); font-size: 0.9rem; line-height: 1.6; background: #070b24; border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; overflow-x: auto; white-space: pre; }
.codeblock code { background: none; padding: 0; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; padding: 0.6rem 1rem; border: 1px solid var(--line); border-radius: 10px; }
.pager a:hover { border-color: var(--cyan); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 1rem 0; }
th, td { border-bottom: 1px solid var(--line); padding: 0.55rem 0.6rem; text-align: left; vertical-align: top; }
th { color: var(--violet); font-weight: 650; }
figure { margin: 1.5rem 0; }
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }

/* Seitennavigation (Paginierungs-Demo) */
.pagination { display: flex; gap: 0.5rem; margin: 1rem 0; }
.pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; height: 2.6rem; padding: 0 0.8rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-family: var(--mono); font-weight: 700; }
.pagination a:hover { border-color: var(--cyan); }
.pagination a[aria-current="page"] { background: var(--cyan); color: var(--bg); border-color: var(--cyan); }

/* Live-Demos */
.snippet { background: #fff; color: #202124; border-color: #dadce0; font-family: Arial, sans-serif; max-width: 40rem; }
.snippet p { margin: 0.15rem 0; }
.snippet-url { font-size: 0.85rem; color: #4d5156; }
.snippet-title { font-size: 1.25rem; color: #1a0dab; line-height: 1.3; }
.snippet-desc { font-size: 0.9rem; color: #4d5156; line-height: 1.5; }
.snippet-meta { font-family: var(--mono); font-size: 0.8rem; color: #5f6368; border-top: 1px solid #dadce0; margin-top: 0.6rem !important; padding-top: 0.5rem; }
.outline { list-style: none; padding-left: 1.4rem; }
.outline li { margin: 0.2rem 0; }
.outline-h3 { margin-left: 1.5rem !important; }
.outline-h4 { margin-left: 3rem !important; }
.cwv dt { font-family: var(--mono); color: var(--cyan); margin-top: 0.5rem; }
.cwv dd { margin: 0 0 0.3rem; font-size: 1.4rem; font-weight: 700; }

.site-footer { border-top: 1px solid var(--line); padding: 1.5rem clamp(1rem, 4vw, 2.5rem); color: var(--muted); font-size: 0.9rem; text-align: center; }
.site-footer p { margin: 0.3rem 0; }

/* Röntgenblick-Overlay */
html.is-xray { overflow: hidden; }
.xray { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; align-items: stretch; padding: clamp(0.5rem, 3vw, 2rem); background: rgba(3, 5, 18, 0.88); backdrop-filter: blur(6px); }
.xray[hidden] { display: none; }
.xray-panel { position: relative; display: flex; flex-direction: column; width: min(70rem, 100%); background: var(--bg-2); border: 1px solid var(--cyan); border-radius: var(--radius); box-shadow: 0 0 60px rgba(92, 242, 255, 0.2); overflow: hidden; }
.xray-head { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); }
.xray-head h2 { margin: 0; font-size: 1.1rem; }
.xray-head .path { font-family: var(--mono); color: var(--muted); font-size: 0.85rem; margin-right: auto; }
.xray-close { font: inherit; cursor: pointer; background: none; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 0.3rem 0.7rem; }
.xray-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); list-style: none; margin: 0; }
.badge { font-size: 0.85rem; padding: 0.3rem 0.65rem; border-radius: 8px; border: 1px solid currentColor; background: rgba(255, 255, 255, 0.03); }
.badge small { color: var(--muted); margin-left: 0.3rem; }
.badge--ok { color: var(--ok); } .badge--warn { color: var(--warn); } .badge--fail { color: var(--fail); } .badge--info { color: var(--info); }
.xray-code { position: relative; flex: 1; margin: 0; overflow: auto; font-family: var(--mono); font-size: 0.85rem; line-height: 1.65; padding: 0.8rem 0; counter-reset: ln; color: #8f9ad0; }
.xray-code .line { display: block; padding: 0 1.1rem 0 4.2rem; white-space: pre; position: relative; }
.xray-code .line::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 3.2rem; text-align: right; color: #7f89c0; }
.xray-code .is-hit { background: rgba(92, 242, 255, 0.13); box-shadow: inset 3px 0 0 var(--cyan); color: var(--text); }
.x-tag { color: #ff7bb0; } .x-attr { color: var(--cyan); } .x-val { color: var(--violet); } .x-com { color: #7f89c0; font-style: italic; }
.xray-message { padding: 1.5rem 1.1rem; color: var(--warn); }
.xray-scan { position: absolute; left: 0; right: 0; height: 3px; top: 0; background: linear-gradient(90deg, transparent, var(--cyan), transparent); box-shadow: 0 0 18px var(--cyan); animation: scan 1.6s ease-in-out 1 forwards; pointer-events: none; }
@keyframes scan { from { top: 0; opacity: 1; } to { top: 100%; opacity: 0; } }

/* Beamer-Modus */
html.is-beamer { font-size: 137.5%; }
html.is-beamer body { background: var(--bg); }
html.is-beamer .lead, html.is-beamer .card-text, html.is-beamer .sources { color: #d3daff; }
html.is-beamer .xray-code { font-size: 1rem; }

@media (max-width: 40rem) {
  table { display: block; overflow-x: auto; }
  .site-header { gap: 0.6rem; }
  .switch span { padding: 0.25rem 0.5rem; }
  .xray-code .line { padding-left: 3rem; }
  .xray-code .line::before { width: 2.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card a { transition: none; }
  .xray-scan { display: none; animation: none; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-header, .controls, .xray, .pager, .skip { display: none !important; }
  a { color: #000; }
  .live, .demo, .note, .myth, .codeblock, .card a { background: #fff; border-color: #999; color: #000; }
}
