:root {
  --bg: #0a0a0c;
  --bg-2: #0f0f14;
  --panel: #161620;
  --panel-2: #1a1a25;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8e6e0;
  --muted: rgba(232, 230, 224, 0.66);
  --red: #ef2706;
  --yellow: #ffde0e;
  --blue: #0789d2;
  --green: #43a316;
  --accent: var(--red);
  --font-main: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", sans-serif;
  --font-hero: "Bebas Neue", "Anton", "Noto Sans SC", sans-serif;
  --font-ui: "Outfit", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(7, 137, 210, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(239, 39, 6, 0.18), transparent 28%),
    linear-gradient(180deg, #0a0a0c 0%, #0d0d12 45%, #111119 100%);
  color: var(--text);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.32;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(232, 230, 224, 0.02),
    rgba(232, 230, 224, 0.02) 1px,
    rgba(0, 0, 0, 0.01) 1px,
    rgba(0, 0, 0, 0.01) 6px
  );
  opacity: 0.22;
  z-index: 0;
}

a {
  color: inherit;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  color: rgba(232, 230, 224, 0.84);
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 12, 0.78);
  border-bottom: 1px solid var(--line);
}

.site-header-inner,
.site-footer-inner,
.shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
}

.site-header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-hero);
  font-size: 22px;
  line-height: 0.9;
  letter-spacing: 0.08em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav a {
  padding: 10px 12px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.shell {
  padding: 28px 0 72px;
}

.stack {
  display: grid;
  gap: 16px;
}

.page-lead {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  align-items: stretch;
}

.hero {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 222, 14, 0.12), transparent 24%),
    radial-gradient(circle at bottom left, rgba(7, 137, 210, 0.12), transparent 26%);
  pointer-events: none;
}

.hero-copy,
.hero-aside {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  gap: 14px;
}

.hero h1,
.hero h2,
.section-title,
.card h2,
.panel h2,
.panel h3 {
  margin: 0;
  font-family: var(--font-hero);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.hero h1 {
  font-size: clamp(54px, 8vw, 112px);
}

.hero p,
.muted {
  color: var(--muted);
}

.hero p,
.panel p,
label,
.body-copy {
  font-size: 14px;
  line-height: 1.9;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-kicker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-kicker span,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 230, 224, 0.84);
}

.hero-aside {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
}

.hero-aside-number {
  font-family: var(--font-hero);
  font-size: clamp(44px, 7vw, 80px);
  color: var(--yellow);
}

.section {
  display: grid;
  gap: 18px;
}

.section-title {
  font-size: clamp(28px, 5vw, 44px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card,
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.018));
  border: 1px solid var(--line);
  overflow: hidden;
}

.card::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 35%);
}

.card {
  display: grid;
  gap: 14px;
  padding: 24px;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

.card p,
.card .muted {
  margin: 0;
}

.card-accent-red { border-top: 2px solid var(--red); }
.card-accent-blue { border-top: 2px solid var(--blue); }
.card-accent-green { border-top: 2px solid var(--green); }
.card-accent-yellow { border-top: 2px solid var(--yellow); }

.panel {
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.panel-header h3 {
  font-size: 28px;
}

label {
  display: grid;
  gap: 8px;
  color: rgba(232, 230, 224, 0.92);
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(232, 230, 224, 0.4);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(7, 137, 210, 0.48);
  box-shadow: 0 0 0 1px rgba(7, 137, 210, 0.28);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

#config-editor {
  min-height: 320px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover,
button:hover,
.button:focus-visible,
button:focus-visible {
  transform: translateY(-1px);
}

.button.secondary,
button.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.button.ghost,
button.ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: transparent;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.inline-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.queue {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
}

.list {
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
}

.list button {
  text-align: left;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid var(--line);
  display: block;
  min-height: 0;
  padding: 16px;
  font-family: var(--font-main);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  border-left: 2px solid rgba(255, 255, 255, 0.14);
  padding-left: 12px;
}

.photo-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 12px;
  align-items: start;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.metric-value {
  margin-top: 8px;
  font-family: var(--font-hero);
  font-size: clamp(30px, 5vw, 54px);
  line-height: 0.95;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(10, 10, 12, 0.7);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  min-height: 88px;
  padding: 16px 0;
}

.footer-note {
  display: grid;
  gap: 4px;
}

.footer-note strong {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-note span {
  color: var(--muted);
  font-size: 13px;
}

.status-callout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 12px rgba(7, 137, 210, 0.8);
}

@media (max-width: 960px) {
  .page-lead,
  .queue,
  .metric-strip,
  .inline-grid,
  .photo-item-row {
    grid-template-columns: 1fr;
  }

  .site-header-inner {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero {
    padding: 24px;
  }

  .hero h1 {
    font-size: clamp(42px, 14vw, 72px);
  }
}
