/* Toolbrick — Pixel-/Baustein-Stil: eckig, wenige Farben (Gelb → Rot), harte Schatten.
   Überschriften als Bausteine, Fließtext in ruhiger Sans-Serif, Code in Monospace. */
:root {
  --paper: #fff8e8;
  --ink: #141414;
  --muted: #5c5a55;
  --line: #141414;
  --y1: #ffd800;
  --y2: #ffaf00;
  --o1: #ff8205;
  --o2: #fa500f;
  --r1: #e10500;
  --px: 6px; /* Grundraster: Ränder, Schatten */
  --shadow: 0 var(--px) 0 var(--ink);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wide: 1200px;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; margin: 0; border-radius: 0 !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { min-height: 100vh; display: flex; flex-direction: column; font-size: 18px; line-height: 1.55; }
a { color: inherit; }
::selection { background: var(--y1); }
code, pre, kbd { font-family: var(--mono); }
code { font-size: .9em; background: rgba(20, 20, 20, .06); padding: 1px 5px; }

/* Pixel-Schrift aus Bausteinen (pixel.js rendert Buchstaben als Raster) */
.pixel-text { display: flex; flex-wrap: wrap; column-gap: calc(var(--cell) * 4); row-gap: calc(var(--cell) * 2); }
.pixel-word { display: inline-flex; gap: var(--cell); flex-wrap: nowrap; }
.pixel-glyph { display: grid; grid-template-columns: repeat(5, var(--cell)); grid-auto-rows: var(--cell); }
.pixel-glyph i { display: block; }
.pixel-glyph i.on {
  background: var(--c, var(--ink));
  /* Noppen: jeder Baustein bekommt einen Lichtpunkt */
  background-image: radial-gradient(circle at 50% 45%, rgba(255,255,255,.35) 0 22%, transparent 24%);
}

/* Farbstreifen wie gestapelte Steine */
.stripes { display: grid; grid-template-columns: repeat(5, 1fr); height: 12px; }
.stripes span:nth-child(1) { background: var(--y1); }
.stripes span:nth-child(2) { background: var(--y2); }
.stripes span:nth-child(3) { background: var(--o1); }
.stripes span:nth-child(4) { background: var(--o2); }
.stripes span:nth-child(5) { background: var(--r1); }

/* Kopfzeile (nur der Seitenkopf; <header> in Kacheln bleibt unberührt) */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px max(32px, calc((100% - var(--wide)) / 2)); border-bottom: 3px solid var(--line);
  background: var(--paper); position: sticky; top: 0; z-index: 20;
}
#logo { --cell: 5px; cursor: pointer; }
#logo a { display: block; }
#who { display: flex; align-items: center; gap: 20px; font-weight: 700; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: 16px; }
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--o1); text-underline-offset: 6px; }
/* Sprachwahl DE · EN: zwei verbundene Bausteine, aktive Sprache dunkel */
.lang-switch { display: inline-flex; }
.lang-switch > * { padding: 6px 10px; font-size: 13px; box-shadow: 0 4px 0 var(--ink); }
.lang-switch > * + * { border-left: 0; }
.lang-switch > [aria-pressed="true"], .lang-switch > .button[aria-current="page"] { background: var(--ink); color: var(--y1); }
.balance { font-family: var(--mono); font-size: 22px; font-weight: 800; padding: 4px 12px; background: var(--y1); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }

main { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 48px 32px 96px; flex: 1; }

/* Bedienelemente: eckig, harter Schatten */
button, .button {
  font: inherit; font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: .04em;
  padding: 14px 24px; border: 3px solid var(--ink); background: var(--y1); color: var(--ink);
  box-shadow: 0 5px 0 var(--ink); cursor: pointer; text-decoration: none; display: inline-block;
  transition: transform .05s, box-shadow .05s, background .1s;
}
button:hover, .button:hover { background: var(--o1); }
button:active, .button:active { transform: translateY(5px); box-shadow: none; }
.button.small, button.small { padding: 8px 16px; font-size: 14px; box-shadow: 0 4px 0 var(--ink); }
button.ghost, .button.ghost { background: #fff; }
button.ghost:hover, .button.ghost:hover { background: var(--y1); }
button.danger { background: var(--r1); color: #fff; }
button:disabled { opacity: .4; cursor: default; }
input, textarea, select {
  font: inherit; font-size: 18px; width: 100%; min-width: 0; padding: 12px 14px;
  border: 3px solid var(--ink); background: #fff; color: var(--ink); outline: none;
}
input:focus, textarea:focus { background: #fffbe8; box-shadow: inset 0 0 0 3px var(--y1); }
textarea { min-height: 140px; resize: vertical; }
label { display: grid; gap: 6px; font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .06em; }
.row { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; min-width: 0; }
.row > button { flex: 0 0 auto; }

h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.02; font-weight: 900; letter-spacing: -.02em; margin-bottom: 24px; }
h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; font-weight: 900; letter-spacing: -.01em; margin: 48px 0 16px; }
.big { font-size: clamp(56px, 9vw, 120px); font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 24px; }
.eyebrow { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); }

/* ---------- Startseite ---------- */
.hero { display: grid; gap: 40px; padding: 24px 0 8px; }
.hero .pixel-text { --cell: clamp(7px, 2vw, 20px); }
.hero-copy { display: grid; gap: 20px; max-width: 760px; }
.hero-copy .lead { margin: 0; }
.hero-copy p { font-size: clamp(19px, 1.8vw, 22px); color: #2b2a27; max-width: 58ch; }
.cta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.dev-login { max-width: 560px; }
.bricks { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0; margin-top: 16px; }
.bricks i { aspect-ratio: 2 / 1; display: block; background-image: radial-gradient(circle at 50% 45%, rgba(255,255,255,.35) 0 14%, transparent 16%); }

.refs { padding: 56px 0 24px; display: grid; gap: 20px; }
.ref-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-top: 3px solid var(--line); border-left: 3px solid var(--line); }
.ref-grid li { display: grid; place-items: center; min-height: 96px; padding: 16px; border-right: 3px solid var(--line); border-bottom: 3px solid var(--line); background: #fff; text-align: center; }
.ref-grid span { font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: #3a3935; }
.ref-grid img { max-width: 140px; max-height: 44px; filter: grayscale(1); opacity: .8; }

.audiences { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; padding: 48px 0 24px; }
.audience { display: grid; gap: 8px; align-content: start; padding: 24px; background: #fff; border: 3px solid var(--ink); box-shadow: var(--shadow); text-decoration: none; transition: transform .08s; }
.audience:hover { transform: translateY(-3px); }
.audience b { font-size: 24px; line-height: 1.15; }
.audience:nth-child(1) { border-top: 12px solid var(--y1); }
.audience:nth-child(2) { border-top: 12px solid var(--o1); }
.audience:nth-child(3) { border-top: 12px solid var(--r1); }

.feature { display: grid; gap: 32px; padding: 80px 0 24px; }
.feature .pixel-text { --cell: clamp(5px, 1.3vw, 13px); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 32px; align-items: start; }
.panel { border: 3px solid var(--ink); box-shadow: var(--shadow); padding: 28px; font-size: 20px; line-height: 1.45; display: grid; gap: 20px; }
.panel.share { background: var(--y1); font-weight: 700; font-size: 22px; }
.panel.share .big { display: block; font-size: clamp(40px, 5.5vw, 72px); line-height: 1.02; margin-bottom: 8px; }
.points { list-style: none; padding: 0; display: grid; gap: 0; border-top: 3px solid var(--line); }
.points li { padding: 16px 0; border-bottom: 3px solid var(--line); }
.points li b { display: block; font-size: 18px; }
.panel-code { margin: 0; }


.final { margin-top: 80px; padding: 48px; background: var(--ink); color: var(--paper); display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; box-shadow: 0 var(--px) 0 var(--o2); }
.final h2 { margin: 0; color: var(--y1); }

/* ---------- Seitenfuß ---------- */
.site-footer {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
  padding: 48px max(32px, calc((100% - var(--wide)) / 2)) 56px; border-top: 3px solid var(--line); background: #fff;
  font-size: 15px;
}
.site-footer p { color: var(--muted); margin-top: 6px; max-width: 36ch; }
.site-footer nav { display: grid; gap: 8px; align-content: start; }
.site-footer nav b { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Rechtsseiten ---------- */
.legal { max-width: 760px; }
.legal h2 { font-size: 22px; margin: 40px 0 10px; }
.legal h3 { font-size: 18px; margin: 24px 0 6px; }
.legal p, .legal li { color: #2b2a27; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 22px; margin: 8px 0; }
.legal .draft { background: var(--y1); border: 3px solid var(--ink); padding: 14px 18px; font-weight: 700; margin-bottom: 32px; }
.legal .todo { background: #ffe9a8; padding: 0 4px; font-family: var(--mono); font-size: .9em; }

/* ---------- Dashboard ---------- */
nav.tabs, main > nav { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
main > nav button { font-size: 16px; }
main > nav button[aria-current="true"] { background: var(--ink); color: var(--y1); }

.card { border: 3px solid var(--ink); background: #fff; padding: 24px; box-shadow: var(--shadow); display: grid; gap: 12px; min-width: 0; }
.card .link { font-family: var(--mono); font-weight: 700; font-size: 17px; word-break: break-all; }
.tag { display: inline-block; padding: 2px 8px; border: 2px solid var(--ink); font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; background: var(--y1); }
.tag.draft { background: #fff; }
.tag.published { background: var(--y1); }
.tag.failing { background: var(--r1); color: #fff; }
.price { font-family: var(--mono); font-weight: 800; font-size: 20px; }
pre { background: var(--ink); color: var(--y1); padding: 20px 22px; overflow-x: auto; font-size: 15px; line-height: 1.6; border: 3px solid var(--ink); }
pre code { background: none; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 17px; }
td, th { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--ink); vertical-align: top; }
td input { font-size: 16px; padding: 6px 8px; border-width: 2px; max-width: 200px; }
td.num, th.num { text-align: right; font-family: var(--mono); font-weight: 800; white-space: nowrap; }

/* Anbieter-Statistik: große Zahlen als Bausteine, Tagesbalken aus Steinen */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; border: 3px solid var(--ink); }
.stats > div { padding: 14px 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; border-right: 3px solid var(--ink); }
.stats > div:last-child { border-right: 0; }
.stats > div:nth-child(1) { background: var(--y1); }
.stats > div:nth-child(2) { background: var(--y2); }
.stats > div:nth-child(3) { background: var(--o1); }
.stats > div:nth-child(4) { background: var(--o2); color: #fff; }
.stats b { display: block; font-family: var(--mono); font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; text-transform: none; letter-spacing: 0; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 72px; padding-top: 8px; }
.bars i { flex: 1; max-width: 32px; background: var(--o1); background-image: radial-gradient(circle at 50% 6px, rgba(255,255,255,.35) 0 3px, transparent 4px); }

/* Meldungen */
#toast { position: fixed; left: 32px; right: 32px; bottom: 32px; padding: 16px 20px; font-weight: 800; font-size: 18px; border: 3px solid var(--ink); background: var(--y1); box-shadow: var(--shadow); display: none; z-index: 30; }
#toast.error { background: var(--r1); color: #fff; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .site-header { padding: 14px 16px; }
  .site-nav { display: none; }
  #logo { --cell: 4px; }
  main { padding: 32px 16px 80px; }
  .final { padding: 28px; }
  .site-footer { grid-template-columns: 1fr; padding: 32px 16px; }
}

/* Katalog-Auszug auf der Startseite: Betreibername + was er bietet */
.ref-grid.catalog { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ref-grid.catalog li { place-items: start; align-content: start; gap: 4px; text-align: left; min-height: 108px; }
.ref-grid.catalog small { font-size: 14px; color: var(--muted); line-height: 1.4; }
.ref-grid.catalog li.more { background: var(--y1); }
.ref-grid.catalog li.more small, .ref-grid.catalog li.more a { color: var(--ink); font-weight: 700; }

/* Qualität: Pixel-Sterne (teilweise gefüllt über --v), Abzeichen, Bewertung */
.stars { font-size: 22px; letter-spacing: 2px; line-height: 1; background: linear-gradient(90deg, var(--o2) calc(var(--v) * 20%), #d8d2c2 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quality { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.quality b { font-size: 20px; }
.quality.big-q .stars { font-size: 32px; }
.quality.big-q b { font-size: 28px; }
.tag.new { background: #fff; }
.rate { display: flex; align-items: center; gap: 4px; }
.rate .star { padding: 0 6px; min-width: 0; font-size: 22px; line-height: 1.2; background: #fff; color: #d8d2c2; box-shadow: none; border-width: 2px; }
.rate .star:hover, .rate .star.on { color: var(--o2); background: var(--y1); }
.reasons { margin: 8px 0 0; padding-left: 20px; }
.reasons li { margin: 4px 0; }
.reasons .stars { font-size: 14px; }

/* Marktplatz: Kacheln je Server und Kategorie */
.market .lead { max-width: 760px; font-size: 20px; }
.market h2 { margin-top: 48px; }
.market-filter { align-items: end; margin: 24px 0 8px; }
.market-filter .check { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.market-filter .check input { width: 22px; height: 22px; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; margin-top: 16px; }
.tile { border: 3px solid var(--ink); background: #fff; box-shadow: var(--shadow); padding: 20px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.tile[hidden] { display: none; }
.tile header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 12px; }
.tile h3 { margin: 0; font-size: 22px; line-height: 1.15; overflow-wrap: break-word; min-width: 0; flex: 1 1 160px; }
.tile p { margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tile footer { display: grid; gap: 8px; font-size: 14px; }
.tile.is-fav { background: linear-gradient(180deg, #fff6c2, #fff 60%); }
.tile.group { border-color: var(--o2); box-shadow: 0 var(--px) 0 var(--o2); }
.fav { flex: 0 0 auto; white-space: nowrap; }
.fav[aria-pressed="true"] { background: var(--r1); color: #fff; }
.tool-list, .group-servers { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.tool-list code { font-weight: 700; }
.tile details summary { cursor: pointer; font-weight: 700; }

/* Besitznachweis */
.tag.verified { background: #fff; border-color: var(--ink); color: var(--ink); box-shadow: inset 0 -4px 0 var(--y1); }
.verify { border: 3px dashed var(--ink); padding: 16px; background: #fffdf4; display: grid; gap: 8px; }
.verify.ok { border-style: solid; background: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.verify ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.verify code { word-break: break-all; }
.verify code.copyable { background: var(--y1); padding: 0 4px; user-select: all; }
input:disabled { background: #eee; color: var(--muted); }

/* Admin */
tr.hot td { background: #fff1e6; }
select { font: inherit; padding: 10px 12px; border: 3px solid var(--ink); background: #fff; border-radius: 0; }

/* Private Server */
.tag.private { background: var(--ink); color: #fff; }
.access-list { list-style: none; padding: 0; margin: 8px 0; }
.access-list li { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 2px solid #eee; }
.access-list li button { margin-left: auto; }

/* Sets: Menü „+ Set“ auf Kacheln */
.set-menu { position: relative; flex: 0 0 auto; }
.set-menu > summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 3px solid var(--ink); background: #fff; font-weight: 700; white-space: nowrap; }
.set-menu > summary::-webkit-details-marker { display: none; }
.set-menu[open] > summary { background: var(--ink); color: #fff; }
.set-menu-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 260px; padding: 12px; background: #fff; border: 3px solid var(--ink); box-shadow: var(--shadow); display: grid; gap: 8px; }
.set-menu-body .row { gap: 8px; }
.set-menu-body input[name="name"] { min-width: 0; }

/* Kachel-Aktionen: quadratische Icon-Knöpfe oben rechts (♡ Favorit, + Set) */
.tile header { flex-wrap: nowrap; }
.tile-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.icon-btn { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; font-size: 22px; line-height: 1;
  border: 3px solid var(--ink); background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--ink); cursor: pointer; list-style: none; }
.icon-btn:hover { background: var(--y1); }
.icon-btn.fav[aria-pressed="true"] { background: var(--r1); color: #fff; }
.set-menu > summary.icon-btn { padding: 0; font-weight: 700; }
.set-menu[open] > summary.icon-btn { background: var(--ink); color: #fff; }
.set-menu-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.set-menu-body label.check { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 16px; cursor: pointer; }
.set-menu-body label.check input { width: 22px; height: 22px; flex: 0 0 auto; margin: 0; }

/* Angaben für App-Bauer (facts.js): Datenangaben, Antwortform, Verlässlichkeit */
.facts { font-size: 14px; }
.facts a { color: inherit; }
.tag.typed { background: #fff; box-shadow: inset 0 -4px 0 var(--o1); text-transform: none; letter-spacing: 0; }
fieldset.data-policy { border: 3px dashed var(--ink); padding: 16px; display: grid; gap: 12px; }
fieldset.data-policy legend { font-weight: 800; padding: 0 6px; }
