/* smoke.vexura.eu · "soot" theme for SmokePing 2.8
   Intent: NOC-Instrument. Dunkler Ruß, heller Rauch, ein glimmender Akzent.
   Depth: nur Linien (rgba), keine Schatten. Grid 4px. Typo-Ratio 1.2. */

@font-face { font-family: "Plex Sans"; src: url(/assets/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(/assets/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(/assets/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/assets/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/assets/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --soot:      #0c0e11;            /* Canvas */
  --ash:       #121519;            /* Panel */
  --cinder:    #181c21;            /* Hover / raised */
  --flue:      #090b0d;            /* Inset: Inputs */
  --seam:      rgba(255,255,255,.065);
  --seam-soft: rgba(255,255,255,.04);
  --seam-hard: rgba(255,255,255,.12);
  --flame:     #ebe8e3;            /* Text primär */
  --smoke:     #a3a9b0;            /* Text sekundär */
  --haze:      #6f767e;            /* Meta */
  --vapor:     #4a5057;            /* deaktiviert */
  --ember:     #f0a33a;            /* einziger Akzent */
  --ember-dim: rgba(240,163,58,.14);
  --sans: "Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --side: 272px;
  --r-s: 4px; --r-m: 8px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--soot); }
body {
  margin: 0; min-height: 100vh;
  background: var(--soot); color: var(--flame);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  display: block; width: auto;
}
a { color: inherit; text-decoration: none; }
img { border: 0; }
hr { display: none; }
::selection { background: var(--ember-dim); color: var(--flame); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: var(--r-s); }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--side);
  background: var(--soot); border-right: 1px solid var(--seam);
  display: flex; flex-direction: column; z-index: 20;
  transition: left .22s var(--ease);
  color: var(--smoke); height: auto;
}
.sidebar-header { height: 56px; padding: 0 20px; display: flex; align-items: center; border-bottom: 1px solid var(--seam); position: static; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--flame); }
.brand-text { font: 500 15px/1 var(--mono); letter-spacing: -.01em; color: var(--smoke); }
.brand-text b { color: var(--flame); font-weight: 500; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.brand-mark i { display: block; width: 3px; border-radius: 2px; background: var(--ember); }
.brand-mark i:nth-child(1) { height: 7px; opacity: .55; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 10px; opacity: .75; }

.sidebar-menu { flex: 1; overflow-y: auto; padding: 12px 12px 24px; scrollbar-width: thin; scrollbar-color: var(--seam-hard) transparent; position: static; }
.sidebar-menu .logo, .sidebar .logo { display: none; }

.filter { margin: 0 0 12px; position: relative; }
.filter-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.filter-text { margin: 0; }
.filter input, .filter-text input {
  width: 100%; height: 34px; padding: 0 12px;
  background: var(--flue); color: var(--flame);
  border: 1px solid var(--seam); border-radius: var(--r-s);
  font: 400 13px var(--mono);
  transition: border-color .15s var(--ease);
}
.filter input::placeholder { color: var(--haze); }
.filter input:hover { border-color: var(--seam-hard); }
.filter input:focus { outline: none; border-color: var(--ember); }

ul.menu { list-style: none; margin: 0; padding: 0; }
ul.menu ul.menu { margin: 2px 0 6px 10px; padding-left: 10px; border-left: 1px solid var(--seam); }
li.menuitem, li.menuactive, li.menuopen { margin: 0; padding: 0; background: none; border: 0; }
a.menulink, a.menulinkactive {
  display: flex; align-items: center; min-height: 32px; padding: 6px 10px;
  border-radius: var(--r-s); color: var(--smoke);
  font-size: 13.5px; font-weight: 400; line-height: 1.3;
  transition: background-color .12s var(--ease), color .12s var(--ease);
}
a.menulink:hover { background: var(--cinder); color: var(--flame); }
li.menuactive > a, a.menulinkactive, li.menuopen > a { color: var(--flame); font-weight: 500; }
li.menuactive > a.menulinkactive, li.menuactive > a { background: var(--ember-dim); color: var(--ember); box-shadow: inset 2px 0 0 var(--ember); }
ul.menu ul.menu a { font-size: 13px; min-height: 28px; padding: 4px 10px; }

.sidebar-foot {
  height: 44px; padding: 0 20px; border-top: 1px solid var(--seam);
  display: flex; align-items: center; justify-content: space-between;
  font: 400 11.5px var(--mono); color: var(--haze); letter-spacing: .02em;
}
.live { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.ember { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 0 rgba(240,163,58,.6); animation: glow 2.4s var(--ease) infinite; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(240,163,58,.55); } 70% { box-shadow: 0 0 0 7px rgba(240,163,58,0); } 100% { box-shadow: 0 0 0 0 rgba(240,163,58,0); } }

/* ---------- Topbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 10; margin-left: var(--side);
  height: 56px; padding: 0 32px; display: flex; align-items: center; gap: 16px;
  background: rgba(12,14,17,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--seam);
  transition: margin-left .22s var(--ease);
}
.navbar-menu { display: flex; }
#menu-button {
  width: 36px; height: 36px; margin-left: -8px; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  border-radius: var(--r-s); color: transparent; font-size: 0; background: none;
}
#menu-button span { display: block; width: 16px; height: 1.5px; background: var(--smoke); border-radius: 1px; }
#menu-button:hover { background: var(--cinder); }
#menu-button:active { transform: scale(.97); }
.crumbs { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-wrap: nowrap; overflow: hidden; font: 400 12.5px var(--mono); color: var(--haze); white-space: nowrap; }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--vapor); }
.crumbs a:hover { color: var(--flame); }
.crumbs [aria-current] { color: var(--smoke); overflow: hidden; text-overflow: ellipsis; }
.navbar-user { margin-left: auto; font: 400 12px var(--mono); color: var(--haze); }
.navbar-user, .icon-person { display: none; }

/* ---------- Main ---------- */
.main { margin-left: var(--side); padding: 32px 32px 24px; max-width: none; transition: margin-left .22s var(--ease); }
.head { margin: 0 0 24px; max-width: 900px; }
.main h1 { margin: 0; font: 600 24px/1.2 var(--sans); letter-spacing: -.018em; color: var(--flame); text-wrap: balance; }
.remark { margin: 8px 0 0; font-size: 14px; color: var(--smoke); text-wrap: pretty; max-width: 72ch; }
.remark:empty { display: none; }
.main > h2 { display: none; }

/* Panels */
.overview, .details { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 620px), 1fr)); align-items: start; }
.overview:empty, .details:empty { display: none; }
.overview:not(:empty) + .details:not(:empty) { margin-top: 16px; }
.panel {
  margin: 0; background: var(--ash); border: 1px solid var(--seam); border-radius: var(--r-m);
  overflow: hidden; transition: border-color .15s var(--ease);
  box-shadow: none; width: auto; display: block; float: none;
}
.panel:hover { border-color: var(--seam-hard); }
.panel-heading { padding: 10px 16px; border-bottom: 1px solid var(--seam-soft); background: none; display: flex; align-items: center; gap: 8px; }
.panel-heading h2 { margin: 0; font: 500 13px/1.3 var(--mono); color: var(--flame); letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel.is-compare { border-color: rgba(240,163,58,.22); }
.panel.is-compare .panel-heading::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--ember); transform: rotate(45deg); flex: none; }
.panel-body { padding: 8px; background: var(--ash); overflow-x: auto; }
.panel-body a { display: block; border-radius: var(--r-s); }

/* Graphen: weißes RRD → Ruß. invert + hue-rotate erhält die Verlustfarben. */
.panel-body img, .details img, #zoom {
  display: block; max-width: 100%; height: auto;
  filter: invert(.92) hue-rotate(180deg) saturate(1.35) contrast(.94);
  border-radius: var(--r-s);
  transition: filter .15s var(--ease);
}
.panel-body a:hover img { filter: invert(.92) hue-rotate(180deg) saturate(1.45) contrast(1) brightness(1.08); }
#zoom { max-width: none; }

/* Navigator / Zoom-Formular */
form#range_form, .details form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 12px 16px; border-top: 1px solid var(--seam-soft); font: 400 12.5px var(--mono); color: var(--smoke); }
input[type=text], input[type=submit], select, button {
  height: 32px; padding: 0 10px; border-radius: var(--r-s);
  border: 1px solid var(--seam); background: var(--flue); color: var(--flame);
  font: 400 12.5px var(--mono);
}
input[type=submit], button { background: var(--cinder); cursor: pointer; transition: border-color .12s var(--ease), transform .1s var(--ease); }
input[type=submit]:hover, button:hover { border-color: var(--ember); color: var(--ember); }
input[type=submit]:active, button:active { transform: scale(.97); }
.imgcrop_wrap, .imgCrop_wrap { margin: 0 auto; }
.imgCrop_selArea, .imgCrop_clickArea { border: 1px dashed var(--ember) !important; }

/* Hotlist-Tabelle / generische Tabellen */
table { border-collapse: collapse; font: 400 13px var(--mono); }
td, th { padding: 6px 12px; border-bottom: 1px solid var(--seam-soft); text-align: left; }

/* Lesehilfe */
.legend-help { margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--seam); border: 1px solid var(--seam); border-radius: var(--r-m); overflow: hidden; }
.legend-help div { background: var(--soot); padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.legend-help b { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--haze); }
.legend-help span { font-size: 13px; color: var(--smoke); text-wrap: pretty; }

/* Footer */
.footer { margin-left: var(--side); padding: 16px 32px 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 400 11.5px var(--mono); color: var(--haze); transition: margin-left .22s var(--ease); }
.footer a { color: var(--smoke); }
.footer a:hover { color: var(--ember); }
.footer p, .footer small { margin: 0; font-size: inherit; }

/* Sidebar umschalten (smokeping.js setzt diese Klassen) */
body.sidebar-hidden .sidebar { left: calc(-1 * var(--side) - 1px); }
body.sidebar-hidden .navbar, body.sidebar-hidden .main, body.sidebar-hidden .footer { margin-left: 0; }
body.sidebar-visible .sidebar { left: 0; }

@media (max-width: 900px) {
  .navbar, .main, .footer { margin-left: 0 !important; }
  .navbar { padding: 0 16px; }
  .main { padding: 24px 16px; }
  .footer { padding: 16px; }
  body.sidebar-visible .sidebar { box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); }
  .overview, .details { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* Detailseiten: große Graphen einspaltig */
.details { grid-template-columns: repeat(auto-fill, minmax(min(100%, 1000px), 1fr)); }
.details .panel-body img { margin: 0 auto; }
.panel, .overview > *, .details > * { min-width: 0; }
