/* ============================================================
   NF APPS — Premium Operations Dashboard
   Aligned with nfcosmetics.de · calmer, more breathing room
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:        #030705;
  --bg-mid:         #071209;
  --bg-surface:     #0a1a0d;
  --panel-bg:       rgba(255, 255, 255, 0.012);
  --panel-bg-hi:    rgba(255, 255, 255, 0.022);

  --line:           rgba(255, 255, 255, 0.05);
  --line-strong:    rgba(255, 255, 255, 0.085);

  --silver:         linear-gradient(135deg, #96a4b6 0%, #d8e2ee 30%, #eef3f8 50%, #ccd6e4 70%, #a0afc2 100%);
  --silver-flat:    #c8d4e0;
  --silver-light:   #eaf0f6;
  --silver-dim:     #8a9cb0;

  --text-primary:   #f0f4f8;
  --text-secondary: #b0bec8;
  --text-muted:     #607080;
  --text-faint:     #455260;

  --font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --transition:     220ms cubic-bezier(.2,.7,.2,1);
  --radius:         2px;

  --container-max:  1240px;
  --container-pad:  clamp(24px, 5vw, 64px);
}

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 50% -12%, rgba(46, 150, 76, 0.10) 0%, transparent 48%),
    radial-gradient(ellipse at 4% 70%,  rgba(36, 120, 60, 0.05) 0%, transparent 36%),
    radial-gradient(ellipse at 96% 95%, rgba(36, 120, 60, 0.04) 0%, transparent 36%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.09); border-radius: 2px; }

::selection { background: rgba(46,150,76,0.22); color: var(--silver-light); }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto;
  padding: 8px 14px; background: var(--bg-mid); border: 1px solid var(--line-strong); z-index: 200;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ============================================================
   COMPACT HEADER
   ============================================================ */

.dash-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.dash-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.dash-brand {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}
.dash-logo {
  height: 42px; width: 42px;
  object-fit: contain;
  opacity: 0.95;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.dash-brand:hover .dash-logo { opacity: 1; }
.dash-brand-meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Header tools cluster ── */
.dash-tools {
  display: inline-flex;
  align-items: center;
  gap: 28px;
}

/* Language switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lang-btn {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 4px;
  transition: color var(--transition);
}
.lang-btn:hover  { color: var(--text-primary); }
.lang-btn.active { color: var(--text-primary); }
.lang-divider {
  color: var(--text-muted);
  font-size: 11px;
  opacity: 0.45;
}

/* Theme toggle pill */
.theme-toggle {
  background: rgba(36, 40, 44, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  position: relative;
  border-radius: 14px;
  width: 50px;
  height: 24px;
  flex-shrink: 0;
  transition: background 0.38s ease, border-color 0.38s ease, box-shadow 0.38s ease;
}
.theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(0, 0, 0, 0.22),
    0 0 0 2.5px rgba(255, 255, 255, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.06);
}
.theme-toggle-icon {
  position: absolute;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(150deg, #2e3f37 0%, #1c2c24 55%, #233028 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.13) inset,
    0 -0.5px 0 rgba(0, 0, 0, 0.26) inset,
    0 2px 6px rgba(0, 0, 0, 0.54),
    0 0 0 0.5px rgba(0, 0, 0, 0.30);
  display: block;
  transition: left 0.44s cubic-bezier(0.26, 1.38, 0.54, 1), background 0.35s ease, box-shadow 0.32s ease;
}
.theme-toggle-icon::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 12px;
  margin: -6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='2.5' fill='rgba(255,255,255,.9)'/%3E%3Cg stroke='rgba(255,255,255,.76)' stroke-width='1.1' stroke-linecap='round'%3E%3Cline x1='7' y1='3' x2='7' y2='1'/%3E%3Cline x1='9.83' y1='4.17' x2='11.24' y2='2.76'/%3E%3Cline x1='11' y1='7' x2='13' y2='7'/%3E%3Cline x1='9.83' y1='9.83' x2='11.24' y2='11.24'/%3E%3Cline x1='7' y1='11' x2='7' y2='13'/%3E%3Cline x1='4.17' y1='9.83' x2='2.76' y2='11.24'/%3E%3Cline x1='3' y1='7' x2='1' y2='7'/%3E%3Cline x1='4.17' y1='4.17' x2='2.76' y2='2.76'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
  transition: opacity 0.28s ease;
}
.theme-toggle-icon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  margin: -7px;
  transform: scaleX(-1);
  opacity: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='rgba(22,38,30,.82)' d='M3.4 3.84A6.2 6.2 0 1 1 3.4 12.16A4.8 4.8 0 1 0 3.4 3.84Z'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: opacity 0.28s ease;
}

/* About button — silver gradient, system font for visual consistency
   with the rest of the dashboard chrome. */
.about-btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 18px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #040806;
  border: none;
  border-radius: 999px;
  background: var(--silver);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: box-shadow var(--transition), transform var(--transition);
}
.about-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--transition);
  pointer-events: none;
}
.about-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(180, 200, 220, 0.22), 0 4px 14px rgba(0, 0, 0, 0.30);
}
.about-btn:hover::after { background: rgba(255, 255, 255, 0.10); }

@media (max-width: 900px) {
  .dash-tools { gap: 22px; }
  .dash-brand { gap: 18px; }
}
@media (max-width: 720px) {
  .dash-tools { gap: 18px; }
  .dash-brand { gap: 16px; }
  .lang-btn { font-size: 10px; padding: 6px 3px; }
}
@media (max-width: 540px) {
  .dash-header-inner { height: 64px; gap: 14px; }
  .dash-tools { gap: 14px; }
  .dash-brand { gap: 14px; }
  .dash-brand-meta { display: none; }
  .dash-logo { height: 36px; width: 36px; }
  .about-btn { height: 30px; padding: 0 14px; font-size: 11px; }
}
@media (max-width: 420px) {
  .dash-header-inner { gap: 12px; }
  .dash-tools { gap: 12px; }
  .lang-switch { gap: 5px; }
  .lang-btn { padding: 6px 3px; }
  .lang-divider { font-size: 10px; }
  .about-btn { height: 28px; padding: 0 12px; font-size: 10px; letter-spacing: 0.10em; }
  .theme-toggle { width: 44px; height: 22px; }
  .theme-toggle-icon { width: 16px; height: 16px; }
  html[data-theme="light"] .theme-toggle-icon { left: 25px; }
}
@media (max-width: 360px) {
  .dash-tools { gap: 9px; }
  .dash-logo { height: 32px; width: 32px; }
  .lang-btn { font-size: 9px; }
}

/* ============================================================
   MAIN
   ============================================================ */

.dash-main {
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(56px, 6vw, 96px);
}

.block { margin-bottom: clamp(56px, 6vw, 88px); }

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(20px, 2vw, 26px);
}
.block-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}
.block-meta {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ============================================================
   SIGNALS
   ============================================================ */

.signals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: var(--panel-bg);
  border-radius: 4px;
  overflow: hidden;
}

.signal {
  padding: clamp(24px, 2.6vw, 36px) clamp(22px, 2.6vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 144px;
  position: relative;
  transition: background var(--transition);
}
.signal + .signal { border-left: 1px solid var(--line); }
.signal:hover { background: var(--panel-bg-hi); }

.signal-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.signal-value {
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 200;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums lining-nums;
  margin-top: auto;
}
.signal-foot {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .signals-grid { grid-template-columns: 1fr; }
  .signal { min-height: 112px; padding: 22px 22px; }
  .signal + .signal { border-left: 0; border-top: 1px solid var(--line); }
}

/* ============================================================
   PROJECTS
   ============================================================ */

.filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.filter {
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.filter:hover { color: var(--silver-flat); border-color: var(--line-strong); }
.filter.is-active {
  color: #040806;
  background: var(--silver);
  border-color: transparent;
}

.modules {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-bg);
  overflow: hidden;
}

.module {
  display: grid;
  /* Fixed pixel widths for icon, title and graph columns. Every row in
     the table renders with identical column tracks — no asymmetry, no
     drift between cards. Description fills remaining space; CTA hugs.
     Title slot is sized to fit "Timeless Craft Moment" + status pill;
     graph slot is generous so sparklines feel expansive. */
  grid-template-columns: 56px 280px minmax(0, 1fr) 280px auto;
  align-items: center;
  gap: clamp(16px, 2vw, 24px);
  padding: clamp(28px, 2.8vw, 36px) clamp(30px, 3vw, 42px);
  position: relative;
  color: inherit;
  transition: background var(--transition);
}
.module + .module { border-top: 1px solid var(--line); }
.module:hover { background: var(--panel-bg-hi); }
.module:hover .module-name { color: var(--silver-light); }
.module:hover .module-graph { color: var(--silver-light); } /* lifts gradient + pin via currentColor */
.module:hover .module-cta { border-color: var(--card-border-hi, rgba(210,225,240,0.22)); color: var(--silver-light); }

/* Favicon — leftmost slot. Links to project. */
.module-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
}
.module-icon:hover { background: rgba(255,255,255,0.05); border-color: var(--line-strong); }
.module-favicon {
  width: 32px; height: 32px;
  object-fit: contain;
  display: block;
}
.module-favicon.is-fallback { opacity: 0.55; }

.module-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  align-self: center;
}
.module-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;   /* status anchors at right edge of title cell */
  gap: 12px;
  flex-wrap: wrap;                  /* drops below title on very narrow viewports */
  min-width: 0;
}
.module-name {
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.25;
  color: var(--text-primary);
  transition: color var(--transition);
  /* Names always render fully on a single line — the title column sizes
     itself to the longest name, so this never overflows. */
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  flex: 0 1 auto;
}
.module-name:hover { color: var(--silver-light); }
.module-head-row .status {
  flex: 0 0 auto;
  align-self: center;
  /* Pill rückt vom rechten Rand der Titel-Spalte etwas nach links ein. */
  margin-right: clamp(14px, 1.6vw, 24px);
}

/* Subtitle — narrow tech mono. Picks the platform's default monospace
   so we don't ship a webfont; tabular numerals add to the tech feel. */
.module-category {
  font-family: 'SF Mono', 'JetBrains Mono', 'IBM Plex Mono', 'Roboto Mono', Menlo, Consolas, ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.module-desc {
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: -0.005em;
  color: var(--text-secondary);
  min-width: 0;
  /* Descriptions are calibrated to fit on exactly two lines from ~1080px
     and up. The min-height keeps module heights harmonized on wider
     viewports where a short line might fit on one line. */
  min-height: calc(1.7em * 2);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.status.is-live::before {
  background: #6fc18a;
  --pulse-rgb: 111, 193, 138;
  animation: statusPulse 2.6s ease-in-out infinite;
}
.status.is-dev::before {
  background: #d8c08a;
  --pulse-rgb: 216, 192, 138;
  animation: statusPulse 3.6s ease-in-out infinite;
}
.status.is-internal::before {
  background: #a9b3b8;
  --pulse-rgb: 169, 179, 184;
  animation: statusPulse 4.6s ease-in-out infinite;
}
.status.is-paused::before {
  background: #807a72;
  --pulse-rgb: 128, 122, 114;
  animation: statusPulse 6s ease-in-out infinite;
  opacity: 0.78;
}

/* One unified pulse — colour and cadence vary per status via CSS vars,
   so each property has its own visual rhythm without four separate keyframes. */
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(var(--pulse-rgb), 0.10), 0 0 0 0 rgba(var(--pulse-rgb), 0.45); }
  60%      { box-shadow: 0 0 0 3px rgba(var(--pulse-rgb), 0.10), 0 0 0 9px rgba(var(--pulse-rgb), 0); }
}

/* ── Mini Intelligence Graph ── */

.module-graph {
  display: block;
  position: relative;
  width: 100%;
  min-width: 0;
  color: var(--silver-flat); /* drives currentColor in spark gradients */
}
/* Caption above the chart: range left, visits right. */
.module-graph-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  min-height: 16px;
  font-variant-numeric: tabular-nums;
}
.module-graph-range,
.module-graph-visits {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.module-graph-range  { color: var(--text-faint); }
.module-graph-visits { color: var(--text-secondary); }
.spark-frame {
  position: relative;
}
.spark-frame.is-empty {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 4px;
}
.spark-empty {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.spark-chart {
  position: relative;
  height: 64px;
  /* reserve a slot at the right for the floating endpoint label;
     wide enough for "999.9k" without clipping */
  padding-right: 70px;
}
.spark {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* Bare numeric label anchored to the dot's vertical position — no pill,
   no border, no fill. Just the value floating next to the endpoint. */
.spark-endpoint {
  position: absolute;
  left: calc(100% - 70px);
  top: 50%;
  transform: translate(10px, -50%);
  max-width: 64px;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  /* fade in shortly after the stroke animation begins */
  opacity: 0;
  animation: sparkEpIn 600ms cubic-bezier(.2,.7,.2,1) 900ms forwards;
}
@keyframes sparkEpIn {
  from { opacity: 0; transform: translate(4px, -50%); }
  to   { opacity: 1; transform: translate(10px, -50%); }
}
.spark-stroke {
  fill: none;
  stroke: var(--silver-dim);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: stroke var(--transition);
}
.spark-area {
  stroke: none;
  opacity: 0.9;
}
/* Tiny round HTML dot — minimalistic, never distorted by the SVG's
   non-uniform aspect ratio. Sits exactly where the line ends. */
.spark-pin {
  position: absolute;
  left: calc(100% - 70px);
  top: 50%; /* overridden inline */
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  animation: sparkPinIn 600ms cubic-bezier(.2,.7,.2,1) 900ms forwards;
}
@keyframes sparkPinIn {
  to { opacity: 0.95; }
}

/* Y peak top-right, 0 bottom-left, axis ticks absolutely positioned along bottom. */
.spark-y-max,
.spark-y-min {
  position: absolute;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.spark-y-max { top: -3px;     right: 0; color: var(--text-secondary); }
.spark-y-min { bottom: 24px;  left: 0;  color: var(--text-faint); }

.spark-axis {
  position: relative;
  margin-top: 8px;
  /* match the chart's padded width so ticks sit below their data points */
  margin-right: 70px;
  height: 14px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.spark-axis-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.spark-axis-tick:first-child { transform: translateX(0); }
.spark-axis-tick:last-child  { transform: translateX(-100%); }

/* Visit button per project */
.module-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.018);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  white-space: nowrap;
}
.module-cta:hover {
  color: var(--silver-light);
  background: rgba(255,255,255,0.04);
  border-color: var(--card-border-hi, rgba(210,225,240,0.28));
}
.module-cta-arrow {
  font-size: 11px;
  opacity: 0.7;
  transition: transform var(--transition), opacity var(--transition);
}
.module-cta:hover .module-cta-arrow { transform: translate(2px, -2px); opacity: 1; }

.module-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 86px;
  padding-left: clamp(6px, 1vw, 14px);
  border-left: 1px solid var(--line);
  text-align: left;
}
.module-stat-value {
  font-size: clamp(28px, 2.4vw, 34px);
  font-weight: 200;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.018em;
}
.module-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.module-stat-window {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.modules-empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Below desktop — each project becomes a calm vertical panel.
   Threshold lifted to 1180px so the description column on horizontal
   layout always has room for clean 2-line copy. ── */
@media (max-width: 1180px) {
  .modules {
    border-radius: 4px;
    background: transparent;
    border: 0;
  }
  .module {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "icon head"
      "desc desc"
      "graph graph"
      "cta  cta";
    column-gap: 20px;
    row-gap: 28px;
    padding: clamp(30px, 5vw, 40px) clamp(24px, 5vw, 32px);
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-bg);
    margin-bottom: 18px;
  }
  .module + .module { border-top: 1px solid var(--line); }

  /* Favicon centers vertically against the title+category block so all
     three sit on the same horizontal axis on mobile (no shift).
     Tight gap pulls the category close to the title for a cleaner block. */
  .module-icon  { grid-area: icon; align-self: center; }
  .module-head  { grid-area: head; gap: 4px; align-self: center; }
  .module-desc  { grid-area: desc; font-size: 14.5px; line-height: 1.72; }
  .module-graph { grid-area: graph; margin-top: 6px; }
  .module-cta   { grid-area: cta; justify-self: stretch; align-self: stretch; justify-content: center; height: 44px; }

  /* Mobile titles stay one-line ("Timeless Craft Moment" included);
     font scales down at narrower viewports below. */
  .module-name { font-size: 18px; line-height: 1.32; white-space: nowrap; flex: 0 1 auto; }
  /* Status pill anchors flush to the right edge of the title row on mobile. */
  .module-head-row { justify-content: space-between; gap: 12px; }
  .module-head-row .status { margin-right: 0; }
  .spark-chart { height: 96px; }
}

/* ── Phone — generous spacing, single column ── */
@media (max-width: 540px) {
  :root { --container-pad: clamp(20px, 6vw, 28px); }

  .dash-main {
    padding-top: clamp(28px, 6vw, 40px);
    padding-bottom: clamp(48px, 8vw, 72px);
  }
  .block { margin-bottom: clamp(40px, 9vw, 64px); }

  /* Signals — vertical stack with calm separators */
  .signals-grid { grid-template-columns: 1fr; border-radius: 6px; }
  .signal {
    min-height: 0;
    padding: 24px 22px;
    gap: 12px;
  }
  .signal-value { font-size: clamp(36px, 11vw, 44px); margin-top: 2px; }

  /* Filter row breathes */
  .filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .filter { padding: 8px 14px; font-size: 10px; }

  /* Project cards on phone */
  .module {
    padding: 28px 22px;
    row-gap: 24px;
  }
  .spark-chart { height: 104px; }
  .module-name { font-size: 17px; }
  .module-desc { font-size: 14.5px; line-height: 1.72; }
  .block-head { row-gap: 16px; }
}

/* ── Compact phones — keep favicon visible, scale it down so the title
   row still has room. Status pill on the right (space-between) with
   flex-wrap will drop below the title if there's not enough width. ── */
@media (max-width: 460px) {
  .module {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 16px;
    padding: 24px 20px;
  }
  .module-icon { width: 44px; height: 44px; border-radius: 9px; }
  .module-favicon { width: 28px; height: 28px; }
  .module-name { font-size: 17px; }
}

/* ── iPhone SE / very narrow phones — even smaller icon, still visible. ── */
@media (max-width: 360px) {
  .module {
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 14px;
    padding: 22px 18px;
  }
  .module-icon { width: 36px; height: 36px; border-radius: 8px; }
  .module-favicon { width: 22px; height: 22px; }
  .module-name { font-size: 16px; }
}

/* ── Subtle scroll-reveal for project cards ────────────────────────────
   Animation triggered via .is-revealed; pre-reveal hides cards gracefully.
   Disabled below for prefers-reduced-motion. */
.module.is-pre-reveal {
  opacity: 0;
  transform: translateY(8px);
  will-change: opacity, transform;
}
.module.is-revealed {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 600ms cubic-bezier(.2,.7,.2,1),
    transform 600ms cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}

/* ── Deep-link highlight ───────────────────────────────────────────────
   Triggered when a project row is the target of /#project-<slug>. The
   ::after overlay sits inside the row and never overrides the row's own
   background or borders — premium glow + thin silver ring, fades once. */

/* Sticky header is 76px (mobile 64px); add breathing room so deep-link
   scroll lands cleanly below the header. */
.module {
  scroll-margin-top: 96px;
}
@media (max-width: 720px) {
  .module { scroll-margin-top: 80px; }
}

.module.is-target-highlight {
  position: relative;
  isolation: isolate;
}

.module.is-target-highlight::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(218, 234, 248, 0.40);
  background: linear-gradient(90deg,
    rgba(218, 234, 248, 0.03) 0%,
    rgba(218, 234, 248, 0.07) 50%,
    rgba(218, 234, 248, 0.03) 100%);
  box-shadow: 0 0 60px 4px rgba(218, 234, 248, 0.06);
  opacity: 0;
  z-index: 1;
  animation: moduleTargetGlow 1.6s ease-out 1 forwards;
}

@keyframes moduleTargetGlow {
  0%   { opacity: 0; }
  18%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Light theme — adjust glow tone for legibility on bright surface. */
html[data-theme="light"] .module.is-target-highlight::after {
  border-color: rgba(20, 40, 32, 0.20);
  background: linear-gradient(90deg,
    rgba(20, 40, 32, 0.025) 0%,
    rgba(20, 40, 32, 0.06) 50%,
    rgba(20, 40, 32, 0.025) 100%);
  box-shadow: 0 0 60px 4px rgba(20, 40, 32, 0.05);
}

/* ============================================================
   TRADEMARK GLYPHS — small, slightly raised, never dominant
   ============================================================ */

.tm-mark {
  display: inline-block;
  font-size: 0.90em;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: super;
  margin-left: 0.14em;
  color: var(--text-primary);
  opacity: 0.92;
  transition: color var(--transition), opacity var(--transition);
}
.tm-mark.tm-r  { font-size: 0.95em; margin-left: 0.10em; }
.tm-mark.tm-tm { font-size: 0.90em; }
.module:hover .tm-mark { color: var(--silver-light); opacity: 1; }

html[data-theme="light"] .tm-mark { color: var(--text-primary); }
html[data-theme="light"] .module:hover .tm-mark { color: var(--silver-light); }

/* ============================================================
   CONTACT BAND — editorial close to the page.
   Atmospheric 3D background using layered radial gradients +
   subtle inset bevels; silver-filled CTA matching the header
   About button. No eyebrow, no secondary email line.
   ============================================================ */

.contact-band {
  position: relative;
  /* No top border, no inset frame — the section flows seamlessly out
     of the page background. A single, very soft halo at the bottom
     adds a hint of depth without creating a visible boundary.
     Top and bottom paddings are equal so the section breathes evenly. */
  padding: clamp(96px, 11vw, 144px) 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(36, 80, 60, 0.07) 0%, transparent 70%);
}

.contact-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}
.contact-headline {
  max-width: 22ch;
  margin: 0 auto clamp(22px, 2vw, 32px);
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text-primary);
  /* Honor manual newlines in the i18n strings (line break before
     "Bemerkenswertes" / "quietly remarkable"). */
  white-space: pre-line;
}
.contact-body {
  max-width: 56ch;
  margin: 0 auto clamp(34px, 3vw, 48px);
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.65;
  letter-spacing: -0.005em;
  color: var(--text-secondary);
}

/* CTA: silver-filled pill, mirrors the .about-btn in the header. */
.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 44px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #040806;
  border: none;
  border-radius: 999px;
  background: var(--silver);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: box-shadow var(--transition), transform var(--transition);
}
.contact-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--transition);
  pointer-events: none;
}
.contact-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 36px rgba(180, 200, 220, 0.28),
    0 6px 22px rgba(0, 0, 0, 0.32);
}
.contact-cta:hover::after { background: rgba(255, 255, 255, 0.10); }
.contact-cta:focus-visible {
  outline: 2px solid var(--silver-flat);
  outline-offset: 4px;
}
.contact-cta-arrow {
  font-size: 0.95em;
  opacity: 0.7;
  transition: transform var(--transition), opacity var(--transition);
}
.contact-cta:hover .contact-cta-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}

@media (max-width: 540px) {
  .contact-band { padding: clamp(64px, 14vw, 88px) 0 clamp(52px, 12vw, 76px); }
  .contact-headline { font-size: clamp(28px, 8.5vw, 38px); }
  .contact-cta { padding: 16px 32px; font-size: 11px; }
}

/* Light mode — silver flips to dark steel; CTA text becomes light. */
html[data-theme="light"] .contact-band {
  background:
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(120, 160, 140, 0.14) 0%, transparent 70%);
}
html[data-theme="light"] .contact-body { color: var(--text-secondary); }
html[data-theme="light"] .contact-cta { color: #f4f7f5; }
html[data-theme="light"] .contact-cta:hover {
  box-shadow:
    0 0 32px rgba(20, 40, 32, 0.22),
    0 6px 18px rgba(20, 40, 32, 0.22);
}

/* ============================================================
   FOOTER — aligned with nfcosmetics.de, calmer spacing
   ============================================================ */

.footer {
  position: relative;
  /* Footer continues the contact-band's bottom halo as a top halo —
     no hard divider, no margin gap, the two sections flow together. */
  border-top: none;
  margin-top: 0;
  padding: 72px 0 56px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(36, 80, 60, 0.07) 0%, transparent 70%);
}
.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}
.footer-link {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-link:hover { color: var(--silver-flat); }
.footer-copy {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.09em;
  opacity: 0.5;
}

@media (max-width: 720px) {
  .footer { padding: 56px 0 48px; }
  .footer-inner { gap: 22px; }
  .footer-links { gap: 18px 24px; }
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  /* Pin and endpoint fade in via animations; force them visible without. */
  .spark-pin      { opacity: 0.95 !important; }
  .spark-endpoint { opacity: 1 !important; transform: translate(10px, -50%) !important; }
}

/* ============================================================
   LIGHT MODE — variable + element overrides
   Aligned with nfcosmetics.de's light palette
   ============================================================ */

html[data-theme="light"] {
  --bg-base:        #e9eeed;
  --bg-mid:         #dfe7e3;
  --bg-surface:     #d3ddd9;
  --panel-bg:       rgba(20, 40, 32, 0.020);
  --panel-bg-hi:    rgba(20, 40, 32, 0.040);
  --line:           rgba(20, 40, 32, 0.085);
  --line-strong:    rgba(20, 40, 32, 0.16);
  --silver:         linear-gradient(135deg, #3a4e5a 0%, #1e2e3a 30%, #0e1e2a 50%, #2a3a48 70%, #4a5e6a 100%);
  --silver-flat:    #2a3a4a;
  --silver-light:   #0e1e2a;
  --silver-dim:     #5a6e7a;
  --text-primary:   #0f1f17;
  --text-secondary: #324050;
  --text-muted:     #586878;
  --text-faint:     #8090a0;
}

html[data-theme="light"] body {
  background-color: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(120, 160, 140, 0.18) 0%, transparent 48%),
    radial-gradient(ellipse at 4% 70%,  rgba(140, 170, 155, 0.10) 0%, transparent 36%),
    radial-gradient(ellipse at 96% 95%, rgba(140, 170, 155, 0.08) 0%, transparent 36%);
}

html[data-theme="light"] ::-webkit-scrollbar-track { background: #e9eeed; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(20, 40, 32, 0.14); }
html[data-theme="light"] ::selection { background: rgba(46, 110, 76, 0.14); color: var(--silver-light); }

html[data-theme="light"] .dash-header {
  background: transparent;
  border-bottom-color: transparent;
}

/* Header tools — light variants */
html[data-theme="light"] .lang-btn        { color: #486070; }
html[data-theme="light"] .lang-btn:hover,
html[data-theme="light"] .lang-btn.active { color: var(--text-primary); }
html[data-theme="light"] .lang-divider    { color: var(--text-muted); }

html[data-theme="light"] .theme-toggle {
  background: rgba(138, 155, 150, 0.84);
  border-color: rgba(0, 0, 0, 0.09);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.13),
    inset 0 0 0 1px rgba(0, 0, 0, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.40);
}
html[data-theme="light"] .theme-toggle:hover {
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.13),
    inset 0 0 0 1px rgba(0, 0, 0, 0.07),
    0 0 0 2.5px rgba(0, 0, 0, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.40);
}
html[data-theme="light"] .theme-toggle-icon {
  left: 29px;
  background: linear-gradient(150deg, #f4f5f4 0%, #e8eceb 55%, #dce4e2 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.90) inset,
    0 -0.5px 0 rgba(0, 0, 0, 0.08) inset,
    0 2px 6px rgba(20, 40, 32, 0.16),
    0 0 0 0.5px rgba(0, 0, 0, 0.10);
}
html[data-theme="light"] .theme-toggle-icon::before { opacity: 0; }
html[data-theme="light"] .theme-toggle-icon::after  { opacity: 1; }

html[data-theme="light"] .about-btn {
  color: #f4f7f5;
  /* --silver flips to dark steel in light mode — light text on dark gradient */
}
html[data-theme="light"] .about-btn:hover {
  box-shadow: 0 0 28px rgba(20, 40, 32, 0.22), 0 4px 14px rgba(20, 40, 32, 0.22);
}

/* Block headings + meta */
html[data-theme="light"] .block-title  { color: var(--text-muted); }
html[data-theme="light"] .block-meta   { color: var(--text-muted); }

/* Signals + modules — surfaces sit on the warm-light background */
html[data-theme="light"] .signals-grid,
html[data-theme="light"] .modules {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line);
}
html[data-theme="light"] .signal:hover,
html[data-theme="light"] .module:hover {
  background: rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .signal-value,
html[data-theme="light"] .module-name,
html[data-theme="light"] .module-stat-value {
  color: var(--text-primary);
}
html[data-theme="light"] .signal-label,
html[data-theme="light"] .signal-foot,
html[data-theme="light"] .module-meta,
html[data-theme="light"] .module-stat-label {
  color: var(--text-muted);
}
html[data-theme="light"] .module-desc { color: var(--text-secondary); }

/* Filters */
html[data-theme="light"] .filter {
  color: var(--text-muted);
  border-color: var(--line);
}
html[data-theme="light"] .filter:hover {
  color: var(--text-primary);
  border-color: var(--line-strong);
}
html[data-theme="light"] .filter.is-active {
  color: #f4f7f5;
  background: linear-gradient(135deg, #2a3a48 0%, #0e1e2a 50%, #2a3a48 100%);
  border-color: transparent;
}

/* Status pills — keep the same accents but recalibrate the halo for light bg */
html[data-theme="light"] .status                { color: var(--text-secondary); }
html[data-theme="light"] .status.is-live::before     { background: #2e8a52; --pulse-rgb: 46, 138, 82; }
html[data-theme="light"] .status.is-dev::before      { background: #b08a30; --pulse-rgb: 176, 138, 48; }
html[data-theme="light"] .status.is-internal::before { background: #5e6e7a; --pulse-rgb: 94, 110, 122; }
html[data-theme="light"] .status.is-paused::before   { background: #8a8270; --pulse-rgb: 138, 130, 112; }

/* Spark chart — shift toward dark steel on light bg */
html[data-theme="light"] .spark-stroke      { stroke: var(--silver-flat); }
html[data-theme="light"] .module:hover .spark-stroke { stroke: var(--silver-light); }
html[data-theme="light"] .spark-dot         { fill: var(--silver-light); stroke: var(--silver-light); }
html[data-theme="light"] .spark-dot-halo    { fill: var(--silver-light); opacity: 0.10; }
html[data-theme="light"] .spark-grid        { stroke: rgba(20, 40, 32, 0.10); }
html[data-theme="light"] .spark-y-max,
html[data-theme="light"] .spark-y-min       { color: var(--text-secondary); }
html[data-theme="light"] .spark-y-min       { color: var(--text-faint); }
html[data-theme="light"] .spark-axis        { color: var(--text-faint); }
html[data-theme="light"] .spark-axis > span:last-child { color: var(--text-muted); }

/* Favicon + Visit button in light mode */
html[data-theme="light"] .module-icon       { background: rgba(255,255,255,0.6); border-color: rgba(20,40,32,0.10); }
html[data-theme="light"] .module-icon:hover { background: rgba(255,255,255,0.85); border-color: rgba(20,40,32,0.18); }
html[data-theme="light"] .module-cta {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.55);
  border-color: rgba(20, 40, 32, 0.16);
}
html[data-theme="light"] .module-cta:hover {
  color: var(--silver-light);
  background: rgba(255,255,255,0.78);
  border-color: rgba(20, 40, 32, 0.28);
}

/* Spark gradients in light mode — addressed separately so the AREA stays
   soft (subtle fill under the line) while the STROKE becomes properly
   opaque against the warm-light background. The previous rule targeted
   both gradients at once, making the stroke too faint. */

/* Area gradient (vertical, id prefix "g-") — soft tint, fades down. */
html[data-theme="light"] .spark-area { opacity: 0.85; }
html[data-theme="light"] .spark linearGradient[id^="g-"] stop:nth-child(1) { stop-color: #1e2e3a; stop-opacity: 0.22; }
html[data-theme="light"] .spark linearGradient[id^="g-"] stop:nth-child(2) { stop-color: #1e2e3a; stop-opacity: 0.07; }
html[data-theme="light"] .spark linearGradient[id^="g-"] stop:nth-child(3) { stop-color: #1e2e3a; stop-opacity: 0; }

/* Stroke gradient (horizontal, id prefix "gs-") — keep full presence so
   the line reads clearly against the light surface. */
html[data-theme="light"] .spark linearGradient[id^="gs-"] stop:nth-child(1) { stop-color: #0e1e2a; stop-opacity: 0.55; }
html[data-theme="light"] .spark linearGradient[id^="gs-"] stop:nth-child(2) { stop-color: #0e1e2a; stop-opacity: 1; }

/* Slightly heavier stroke width on light bg so the line never disappears. */
html[data-theme="light"] .spark-stroke { stroke-width: 1.3; }

/* Footer */
html[data-theme="light"] .footer       {
  border-top: none;
  background: radial-gradient(ellipse 90% 70% at 50% 0%, rgba(120, 160, 140, 0.12) 0%, transparent 70%);
}
html[data-theme="light"] .footer-link  { color: var(--text-muted); }
html[data-theme="light"] .footer-link:hover { color: var(--text-primary); }
html[data-theme="light"] .footer-copy  { color: var(--text-muted); }

