.blockHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modeToggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(7, 11, 10, 0.82);
}

.modeButton {
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  color: var(--color-text-secondary);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.modeButton:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.modeButtonActive {
  color: #081000;
  background: var(--color-primary);
}

.blockTitle {
  margin: 0;
  color: var(--color-text);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.blockDescription {
  margin: 0.45rem 0 0;
  max-width: 58rem;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.overviewGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.overviewCard {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(118, 185, 0, 0.14);
  background:
    linear-gradient(145deg, rgba(118, 185, 0, 0.12), rgba(0, 212, 255, 0.05)),
    rgba(7, 10, 10, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.overviewLabel {
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overviewValue {
  color: var(--color-text);
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.overviewHint {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.sectionGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}

.sectionGroup {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.groupHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.groupTitle {
  margin: 0;
  color: var(--color-text);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.groupDescription {
  margin: 0.4rem 0 0;
  color: var(--color-text-secondary);
  font-size: 0.84rem;
  line-height: 1.5;
}

.systemCard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(118, 185, 0, 0.08), rgba(118, 185, 0, 0.01)),
    rgba(7, 11, 10, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.systemCard:hover {
  transform: translateY(-2px);
  border-color: rgba(118, 185, 0, 0.18);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.cardHeader {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cardCopy {
  min-width: 0;
}

.cardEyebrow {
  display: inline-flex;
  color: var(--color-primary-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cardTitle {
  margin: 0.45rem 0 0;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cardDescription {
  margin: 0.45rem 0 0;
  color: var(--color-text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
}

.cardBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1;
}

.badgeActive {
  border-color: rgba(118, 185, 0, 0.2);
  background: rgba(118, 185, 0, 0.14);
  color: var(--color-primary-light);
}

.badgeInactive {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-secondary);
}

.badgeInfo {
  border-color: rgba(0, 212, 255, 0.16);
  background: rgba(0, 212, 255, 0.1);
  color: var(--color-accent-cyan);
}

.summaryList {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  padding: 0.9rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(3, 6, 6, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.summaryRow {
  display: grid;
  grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
  align-items: start;
  gap: 0.9rem;
}

.summaryLabel {
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

.summaryValue {
  min-width: 0;
  text-align: left;
  color: var(--color-text);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-mono);
  line-height: 1.55;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.tagRow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cardFooter {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.9rem;
  margin-top: auto;
  padding-top: 0.1rem;
}

.cardActions {
  display: flex;
  justify-content: flex-end;
}

.sectionKey {
  display: block;
  max-width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(3, 6, 6, 0.42);
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.rawToolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.rawToolbarButton {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.rawToolbarButton:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.rawToolbarButtonPrimary {
  border-color: rgba(118, 185, 0, 0.2);
  background: rgba(118, 185, 0, 0.16);
  color: var(--color-primary-light);
}

.rawEditorPanel {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.rawEditor {
  min-height: 420px;
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: rgba(4, 8, 8, 0.92);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.6;
}

.rawEditor:focus {
  outline: 1px solid rgba(118, 185, 0, 0.4);
  border-color: rgba(118, 185, 0, 0.28);
}

.rawHintRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.rawHint {
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.rawDirtyState {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.rawError {
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 105, 97, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 105, 97, 0.08);
  color: #ffb4ad;
  font-size: 0.84rem;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .overviewGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .systemCard {
    padding: 0.9rem;
  }

  .blockHeader,
  .rawHintRow {
    flex-direction: column;
  }

  .cardFooter {
    flex-direction: column;
    align-items: flex-start;
  }

  .summaryRow {
    grid-template-columns: 1fr;
  }

  .summaryValue {
    text-align: left;
  }
}
