/* IT mit Mario – öffentliche Website. Dunkles Terminal-/Tech-Design, Neongrün als Markenfarbe. */
/* Schriften: lokal eingebunden (kein Abruf bei Google, DSGVO-freundlich). Dateien optional in public/assets/fonts/ ablegen,
   siehe public/assets/fonts/README.txt. Ohne die Dateien greifen die System-Schriften. */
@font-face { font-family: 'Rajdhani'; font-weight: 500; font-style: normal; font-display: swap; src: local('Rajdhani Medium'), local('Rajdhani-Medium'), url('/assets/fonts/rajdhani-500.woff2') format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 600; font-style: normal; font-display: swap; src: local('Rajdhani SemiBold'), local('Rajdhani-SemiBold'), url('/assets/fonts/rajdhani-600.woff2') format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 700; font-style: normal; font-display: swap; src: local('Rajdhani Bold'), local('Rajdhani-Bold'), url('/assets/fonts/rajdhani-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400 600; font-style: normal; font-display: swap; src: local('Inter'), url('/assets/fonts/inter-var.woff2') format('woff2'); }

:root {
  --bg: #0a0e15; --bg-2: #0d131c; --card: #10171f; --card-2: #141d28; --line: #223041;
  --text: #e7edf5; --muted: #8a97ab; --heading: #ffffff;
  --accent: #24e37a; --accent-ink: #04140a; --accent-soft: rgba(36, 227, 122, .12); --accent-line: rgba(36, 227, 122, .35);
  --ok: #24e37a; --ok-bg: rgba(36, 227, 122, .12); --danger: #ff5c5c; --danger-bg: rgba(255, 92, 92, .12); --warn-bg: rgba(255, 190, 60, .12);
  --radius: 10px; --wrap: 1120px;
  --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: 'Rajdhani', 'Bahnschrift', 'Arial Narrow', var(--font);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .logo, .primary a, .btn, .kicker { font-family: var(--font-head); }
h1 { font-weight: 700; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.15; margin: .3rem 0 .9rem; color: var(--heading); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-weight: 700; font-size: 1.5rem; margin: 0 0 .9rem; color: var(--heading); text-transform: uppercase; letter-spacing: .02em; }
h3 { font-weight: 600; font-size: 1.15rem; margin: 0 0 .4rem; line-height: 1.3; }
.wrap { width: min(var(--wrap), 100% - 2rem); margin-inline: auto; }
.narrow { max-width: 620px; }
.block { padding: 2.2rem 0; }
.muted, .meta { color: var(--muted); }
.meta { font-size: .88rem; margin: .3rem 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 30; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.prompt { font-family: var(--mono); color: var(--accent); }

/* Kopf */
.top { background: rgba(10, 14, 21, .94); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem 1.25rem; padding: .55rem 0; }
.logo { flex: 0 0 auto; display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; color: #fff; text-transform: uppercase; letter-spacing: .02em; text-decoration: none; }
.logo img { display: block; height: var(--logo-h, 80px); width: auto; max-width: min(360px, 60vw); object-fit: contain; }
.logo-mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: .95rem; font-weight: 700; }
.burger { display: none; margin-left: auto; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .35rem .75rem; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.primary { flex: 1 1 auto; min-width: 0; }
.primary ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem; }
.primary > ul > li > a, .userlink { display: block; padding: .5rem .7rem; color: var(--text); text-decoration: none; border-radius: 6px; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; font-size: .95rem; letter-spacing: .03em; white-space: nowrap; }
.primary > ul > li > a:hover, .primary > ul > li > a[aria-current="page"], .userlink:hover { background: var(--accent-soft); color: var(--accent); }
.has-sub { position: relative; display: flex; align-items: center; }
.subtoggle { display: inline-block; background: none; border: 0; color: var(--muted); cursor: pointer; padding: .4rem .4rem .4rem 0; font-size: .85rem; line-height: 1; }
.subtoggle:hover, .has-sub.open > .subtoggle { color: var(--accent); }
/* Untermenüs sind standardmäßig zu. Geöffnet werden sie nur über die Klasse .open (gesetzt von site.js:
   Mauszeiger darüber, Klick/Tipp auf den Pfeil oder Tastatur). Kein :hover und kein :focus-within in CSS,
   damit ein Untermenü nach einem Klick nicht „hängen“ bleibt und auch Geräte mit unklarer Hover-Erkennung (Touch-Laptops) funktionieren. */
.has-sub > .sub { display: none; position: absolute; left: 0; top: calc(100% + 6px); min-width: 220px; margin: 0; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .4rem; flex-direction: column; gap: .1rem; box-shadow: 0 12px 28px rgba(0,0,0,.5); z-index: 30; }
.has-sub > .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; } /* Hover-Brücke zwischen Menüpunkt und Untermenü */
.sub.sub-right { left: auto; right: 0; }
.sub a, .sub .linkbtn { display: block; width: 100%; text-align: left; padding: .5rem .75rem; color: var(--text); text-decoration: none; border-radius: 6px; font: 500 .95rem var(--font); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.sub a:hover, .sub .linkbtn:hover { background: var(--accent-soft); color: var(--accent); }
.sub form { margin: 0; }
.has-sub.open > .sub { display: flex; animation: subin .12s ease-out; }
@keyframes subin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .has-sub.open > .sub { animation: none; } }
/* Ohne JavaScript: Untermenü beim Darüberfahren (nur Desktop) */
@media (min-width: 1101px) { html:not(.js) .has-sub:hover > .sub, html:not(.js) .has-sub:focus-within > .sub { display: flex; } }
.acct { flex: 0 0 auto; margin-left: auto; display: flex; flex-wrap: nowrap; gap: .6rem; align-items: center; font-size: .92rem; white-space: nowrap; }
.acct form { margin: 0; }
.search input { width: 8rem; padding: .4rem .6rem; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-2); color: #fff; font: inherit; }
.linkbtn { background: none; border: 0; color: var(--text); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; }
.sub .linkbtn { text-decoration: none; font-weight: 500; }

/* Hero mit Grid-Muster */
.hero {
  position: relative; overflow: hidden; padding: 4rem 0 3.5rem;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(36,227,122,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36,227,122,.07) 1px, transparent 1px);
  background-size: 42px 42px;
}
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(36,227,122,.10), transparent 60%); pointer-events: none; }
.hero .wrap { position: relative; }
.hero h1 span.accent { color: var(--accent); }
.prompt-line { font-family: var(--mono); margin: 0 0 .8rem; color: var(--accent); font-size: .95rem; }
.stats { display: flex; flex-wrap: wrap; gap: 2.2rem; margin: 2.2rem 0 0; }
.stats dt { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stats dd { margin: 0; font-size: 1.9rem; font-weight: 700; color: var(--accent); font-family: var(--font-head); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46rem; }

/* Buttons und Formulare */
.btn { display: inline-block; font-weight: 700; text-transform: uppercase; font-size: .92rem; letter-spacing: .02em; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 8px; padding: .65rem 1.3rem; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.small { padding: .35rem .9rem; font-size: .85rem; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost-light { background: transparent; color: var(--text); border-color: var(--line); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #1a0505; }
.stack { display: grid; gap: .9rem; }
label { display: block; font-weight: 600; font-size: .93rem; }
label input, label select, label textarea { display: block; width: 100%; margin-top: .3rem; font-weight: 400; }
label.check { font-weight: 400; display: flex; gap: .5rem; align-items: start; }
label.check input { width: auto; margin-top: .3rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: .55rem .65rem; }
input::placeholder { color: var(--muted); }
small { display: block; color: var(--muted); font-weight: 400; margin-top: .25rem; }
.hp { position: absolute; left: -9999px; }
.notice { border-radius: var(--radius); padding: .7rem 1rem; margin: 0 0 1rem; border: 1px solid var(--line); background: var(--warn-bg); }
.notice.error { background: var(--danger-bg); border-color: rgba(255,92,92,.4); color: #ff8f8f; }
.notice.ok { background: var(--ok-bg); border-color: var(--accent-line); color: var(--accent); }
.notice ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.inline-search { display: flex; gap: .5rem; margin-bottom: 1rem; }
.inline-search input { margin: 0; }

/* Karten, Chips */
.grid-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.2rem; }
.card-post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.card-post:hover { border-color: var(--accent-line); }
.card-post .cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.card-post .body { padding: .9rem 1rem 1rem; }
.card-post h3 a { color: var(--heading); text-decoration: none; font-family: var(--font); font-weight: 600; }
.card-post h3 a:hover { color: var(--accent); }
.kicker { margin: 0 0 .3rem; font-size: .78rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.chips { list-style: none; padding: 0; margin: 0 0 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { display: inline-block; padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: var(--text); font-size: .9rem; }
.chips a[aria-current="page"], .chips a:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chips.small a { font-size: .82rem; padding: .2rem .65rem; }
.count { color: var(--muted); font-size: .85em; }
.crumbs { font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; margin: 1.5rem 0; }

/* Artikel */
.article { padding: 1.5rem 0 3rem; }
.hero-img { width: 100%; border-radius: var(--radius); margin: 1rem 0; }
/* Beitragstext: nutzt die volle Breite wie das Titelbild und passt Schrift und Abstände an die Bildschirmbreite an */
.prose { width: 100%; max-width: 100%; font-size: clamp(1rem, .94rem + .3vw, 1.2rem); line-height: 1.75; overflow-wrap: anywhere; hyphens: auto; }
.prose > * { max-width: 100%; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose img, .prose video, .prose iframe, .prose figure { max-width: 100%; height: auto; }
.prose iframe { aspect-ratio: 16 / 9; width: 100%; border: 0; }
.article .lead { max-width: 100%; font-size: clamp(1.05rem, 1rem + .3vw, 1.3rem); }
.article .hero-img { height: auto; }
.prose h2 { margin-top: 2rem; text-transform: none; letter-spacing: 0; } .prose h3 { margin-top: 1.5rem; }
.prose img { border-radius: 8px; }
.prose pre { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); padding: 1rem; border-radius: 8px; overflow-x: auto; }
.prose code { font-family: var(--mono); font-size: .9em; }
.prose :not(pre) > code { background: var(--card-2); padding: .1em .35em; border-radius: 4px; }
.prose blockquote { margin-left: 0; padding-left: 1rem; border-left: 4px solid var(--accent); color: var(--muted); }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: .4rem .7rem; }
.prose th { background: var(--card-2); }

/* Karten-Panels (Konto, Shop, Forum) */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1.2rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; align-items: start; }
.table-wrap { overflow-x: auto; }
table.plain { border-collapse: collapse; width: 100%; min-width: 520px; }
table.plain th, table.plain td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { color: var(--muted); font-size: .85rem; }
.price { font-weight: 700; font-size: 1.2rem; font-family: var(--font-head); color: var(--accent); }
.badge { display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--card-2); color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--accent); }
.badge.pro { background: rgba(180,120,255,.15); color: #c9a3ff; }
.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.post { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.post .who { font-size: .9rem; color: var(--muted); }
.post .text { overflow-wrap: anywhere; }
.linkbtn.danger { color: var(--danger); }
.mono { font-family: var(--mono); }
.result-grid { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.2rem; }
.result-grid dt { color: var(--muted); } .result-grid dd { margin: 0; font-family: var(--mono); overflow-wrap: anywhere; }

.foot { background: var(--bg-2); color: var(--muted); margin-top: 3rem; padding: 2.2rem 0 5.5rem; font-size: .93rem; border-top: 1px solid var(--line); }
.foot strong { color: var(--text); font-family: var(--font-head); text-transform: uppercase; font-size: .95rem; letter-spacing: .03em; }
.foot ul { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .3rem; }
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.copy { margin-top: 1.8rem; font-size: .85rem; color: #5b6879; }

/* Cookie-Banner */
.cookiebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--bg-2); border-top: 1px solid var(--line); padding: .9rem 0; box-shadow: 0 -8px 24px rgba(0,0,0,.4); }
.cookiebar-inner { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; justify-content: space-between; }
.cookiebar p { margin: 0; font-size: .88rem; color: var(--muted); max-width: 60ch; }
.cookiebar a { color: var(--accent); }
.cookiebar-actions { display: flex; gap: .6rem; flex-shrink: 0; }

@media (max-width: 1360px) and (min-width: 1101px) {
  .logo img { height: min(var(--logo-h, 80px), 64px); }
  .search input { width: 6.5rem; }
}
@media (max-width: 1100px) {
  .bar { flex-wrap: wrap; }
  .logo img { height: min(var(--logo-h, 80px), 64px); }
  .burger { display: inline-block; }
  .primary { display: none; order: 3; flex-basis: 100%; }
  .primary.open { display: block; }
  .primary ul { flex-direction: column; gap: 0; }
  .primary > ul > li > a { padding: .7rem .5rem; }
  .has-sub { flex-wrap: wrap; }
  .has-sub > a { flex: 1; }
  .subtoggle { padding: .6rem .8rem; font-size: 1rem; }
  .has-sub > .sub { position: static; width: 100%; box-shadow: none; border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: 0 0 .3rem .5rem; background: transparent; }
  .has-sub > .sub::before { display: none; }
  .acct { order: 2; margin-left: 0; flex-basis: 100%; flex-wrap: wrap; }
  .usermenu { flex-wrap: wrap; width: 100%; }
}
@media (max-width: 700px) {
  .logo img { height: min(var(--logo-h, 80px), 56px); max-width: 62vw; }
  .article { padding: 1rem 0 2rem; }
  .prose { line-height: 1.7; }
  .prose pre { font-size: .85rem; }
  .post { grid-template-columns: 1fr; }
  .cookiebar-inner { flex-direction: column; align-items: stretch; }
}

.social { list-style: none; display: flex; gap: .6rem; padding: 0; margin: .8rem 0 0; }
.social a { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line); color: var(--text); background: var(--card); transition: color .15s, border-color .15s; }
.social a:hover { color: var(--accent); border-color: var(--accent-line); }

/* Forum: Hinweise, Moderation */
.inline-form { display: inline; margin: 0 0 0 .6rem; }
.inline-form .btn { vertical-align: baseline; }
.modlinks { margin-top: 1.5rem; font-size: .9rem; }
.modbar { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--radius); padding: .7rem 1rem; margin: 0 0 1.2rem; }
.modbar-title { margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.modbar-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.modbar-actions form { margin: 0; display: inline-flex; gap: .4rem; align-items: center; }
.modbar-actions select { width: auto; margin: 0; padding: .3rem .5rem; }
.modtag { display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.modtag.warn { background: var(--warn-bg); border-color: rgba(255,190,60,.4); color: #ffbe3c; }
.post.is-hidden { opacity: .72; border-left: 3px solid #ffbe3c; padding-left: .8rem; }
.post .edited { font-size: .82rem; margin: .5rem 0 0; }
.post-tools { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin-top: .6rem; font-size: .9rem; }
.post-tools form { margin: 0; display: inline; }
.modedit { margin-top: .6rem; }
.modedit summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.modedit form { margin-top: .6rem; }

/* Kopfzeile: Menü bleibt auf Desktop einzeilig */
@media (min-width: 1101px) {
  .primary > ul > li > a { padding: .5rem .5rem; }
  .primary ul { gap: 0; }
  .subtoggle { padding: .4rem .25rem .4rem 0; }
  .bar { gap: .5rem 1rem; }
  .search input { width: 6.5rem; }
}
@media (min-width: 1101px) and (max-width: 1240px) { .primary > ul > li > a { font-size: .88rem; padding: .5rem .4rem; } }
