
:root {
  --bg: #050714;
  --bg-soft: #0e1324;
  --card: #f9fafb;
  --card-soft: #eef2ff;
  --accent: #f97316;
  --accent-soft: #ffedd5;
  --accent-2: #4f46e5;
  --text-main: #0b1120;
  --text-soft: #4b5563;
  --border-subtle: #e5e7eb;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow-soft: 0 18px 40px rgba(15,23,42,0.35);
  --radius-lg: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top, #1d253a 0, #050714 45%, #020617 100%);
  color: var(--text-main);
}

.app-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

header.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: conic-gradient(from 210deg, #f97316, #4f46e5, #22c55e, #f97316);
  padding: 3px;
  box-shadow: 0 0 18px rgba(248, 148, 51, 0.9);
}

.brand-mark-inner {
  width: 100%;
  height: 100%;
  border-radius: 11px;
  background: radial-gradient(circle at 20% 20%, #fefce8 0, #0f172a 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text span:nth-child(1) {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #e5e7eb;
}

.brand-text span:nth-child(2) {
  font-size: 18px;
  font-weight: 600;
  color: #f9fafb;
}

.lang-switcher {
  display: flex;
  gap: 6px;
  background: rgba(15,23,42,0.9);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(248, 148, 51, 0.5);
  backdrop-filter: blur(10px);
}

.lang-btn {
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  min-width: 52px;
  text-align: center;
}

.lang-btn.active {
  background: linear-gradient(135deg, #f97316, #4f46e5);
  color: #0f172a;
  font-weight: 600;
  transform: translateY(-1px);
}

.hero-card {
  background: linear-gradient(135deg, #f97316, #4f46e5);
  border-radius: 22px;
  padding: 18px 18px 16px;
  color: #fefce8;
  box-shadow: var(--shadow-soft);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-text-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.hero-text-sub {
  font-size: 13px;
  opacity: 0.9;
}

.hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.hero-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,0.22);
  border: 1px solid rgba(15,23,42,0.45);
}

.hero-diagram {
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-diagram-inner {
  width: 108px;
  height: 72px;
  border-radius: 20px;
  background: rgba(15,23,42,0.85);
  border: 1px solid rgba(15,23,42,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.hero-led-row {
  display: flex;
  gap: 8px;
}

.hero-led {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 10px rgba(15,23,42,0.8);
}

.hero-led.green { background: #22c55e; }
.hero-led.yellow { background: #eab308; }
.hero-led.red { background: #ef4444; }

.hero-led::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.95), transparent 55%);
  opacity: 0.9;
}

.hero-caption {
  font-size: 10px;
  opacity: 0.7;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
}

.section {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
}

.section h2 {
  margin-top: 0;
  font-size: 17px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section h2::before {
  content: "";
  width: 6px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f97316, #4f46e5);
}

p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
  margin: 6px 0;
}

.led-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
}

.led {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  background-color: #16a34a;
  box-shadow: 0 0 12px rgba(22,163,74,0.8);
}

.led::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.95), transparent 55%);
  opacity: 0.9;
}

.led-green {
  background-color: #16a34a;
  box-shadow: 0 0 12px rgba(22,163,74,0.8);
}

.led-yellow {
  background-color: #eab308;
  box-shadow: 0 0 12px rgba(234,179,8,0.8);
}

.led-red {
  background-color: #dc2626;
  box-shadow: 0 0 12px rgba(220,38,38,0.8);
}

@keyframes slowBlink {
  0% { opacity: 1; }
  50% { opacity: 0.2; }
  100% { opacity: 1; }
}

@keyframes fastBlink {
  0% { opacity: 1; }
  50% { opacity: 0.1; }
  100% { opacity: 1; }
}

@keyframes greenToYellow {
  0%, 45% {
    background-color: #16a34a;
    box-shadow: 0 0 12px rgba(22,163,74,0.8);
  }
  55%, 100% {
    background-color: #eab308;
    box-shadow: 0 0 12px rgba(234,179,8,0.8);
  }
}

@keyframes redToYellowFast {
  0%, 45% {
    background-color: #dc2626;
    box-shadow: 0 0 12px rgba(220,38,38,0.8);
  }
  55%, 100% {
    background-color: #eab308;
    box-shadow: 0 0 12px rgba(234,179,8,0.8);
  }
}

.slow-blink { animation: slowBlink 1.4s infinite; }
.fast-blink { animation: fastBlink 0.45s infinite; }

.led-gy { animation: greenToYellow 1.4s infinite; }
.led-ry-fast { animation: redToYellowFast 0.6s infinite; }

.accordion {
  cursor: pointer;
  padding: 10px 12px;
  width: 100%;
  border: none;
  outline: none;
  background: var(--card-soft);
  border-radius: 12px;
  font-size: 14px;
  text-align: left;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  transition: background 0.2s, transform 0.1s;
}

.accordion span.label {
  pointer-events: none;
}

.accordion:hover {
  background: #e0e7ff;
  transform: translateY(-1px);
}

.accordion::after {
  content: "▾";
  font-size: 12px;
  color: #6b7280;
  transition: transform 0.2s;
}

.accordion.active::after {
  transform: rotate(180deg);
}

.panel {
  display: none;
  padding: 8px 4px 4px;
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--accent-soft);
  color: #92400e;
  border: 1px solid #fed7aa;
  margin-top: 6px;
}

.warning {
  background: #fee2e2;
  border-left: 4px solid var(--danger);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: #7f1d1d;
  margin-top: 10px;
}

.footer-note {
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 18px;
}

@media (max-width: 820px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  header.app-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .lang-switcher {
    align-self: flex-end;
  }
  .hero-card {
    flex-direction: column;
  }
  .hero-diagram {
    align-self: center;
  }
}
