.quota-figure {
  max-width: 320px;
  margin: 8px auto 4px;
}
.quota-figure img {
  width: auto;
  max-width: 100%;
  height: auto;
}

img[src*="cockpit-logo"] {
  object-fit: contain;
  background: transparent;
}

.download-grid { grid-template-columns: repeat(2, 1fr); }
.guide-index { grid-template-columns: repeat(2, 1fr); }

.download-scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}
.download-scope strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}
.download-scope > div > small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.download-scope-options {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
}
.download-scope-options button {
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.download-scope-options button:hover:not(:disabled) { color: var(--text); }
.download-scope-options button.active {
  color: #d1fbc1;
  background: rgba(144, 248, 108, 0.12);
}
.download-scope-options button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
.download-scope-options span {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 9px;
}

.health-check-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(144, 248, 108, 0.18);
  border-radius: 12px;
  background: rgba(144, 248, 108, 0.035);
}
.health-check-card[hidden] { display: none; }
.health-check-copy .eyebrow { margin-bottom: 6px; }
.health-check-copy h3 { margin: 0 0 7px; font-size: 15px; }
.health-check-copy p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.health-check-button {
  min-width: 126px;
  border: 1px solid rgba(144, 248, 108, 0.32);
  color: #c5f8b2;
  background: rgba(144, 248, 108, 0.08);
}
.health-check-button:hover:not(:disabled) { background: rgba(144, 248, 108, 0.14); }
.health-check-progress,
.health-check-results {
  grid-column: 1 / -1;
}
.health-check-progress {
  color: var(--muted);
  font-size: 11px;
}
.health-check-progress .progress-track { margin-bottom: 8px; }
.health-check-results {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.health-check-results > strong {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
}
.health-check-list { display: grid; gap: 7px; }
.health-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  font-size: 11px;
}
.health-check-email {
  min-width: 0;
  overflow: hidden;
  color: #c8ced8;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.health-check-state { flex: 0 0 auto; font-weight: 750; }
.health-check-state.healthy { color: var(--accent); }
.health-check-state.unhealthy { color: var(--warning); }
.health-check-reason {
  display: block;
  max-width: 280px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.45;
  text-align: right;
}
.health-check-quota {
  margin-left: 7px;
  color: var(--muted);
  font-weight: 400;
}

.account-alert {
  width: min(680px, calc(100% - 28px));
  max-height: min(78vh, 720px);
  padding: 26px;
  overflow: auto;
  border: 1px solid rgba(255, 211, 107, 0.28);
  border-radius: 18px;
  color: var(--text);
  background: #12161d;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.72);
}
.account-alert::backdrop {
  background: rgba(2, 4, 7, 0.78);
  backdrop-filter: blur(7px);
}
.account-alert-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.account-alert-head .eyebrow { margin-bottom: 5px; color: var(--warning); }
.account-alert-head h2 { margin: 0; font-size: 23px; }
.account-alert-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 211, 107, 0.3);
  border-radius: 50%;
  color: var(--warning);
  background: rgba(255, 211, 107, 0.08);
  font-weight: 850;
}
.account-alert-message {
  margin: 18px 0 12px;
  color: #c8ced8;
  font-size: 13px;
  line-height: 1.7;
}
.account-alert-lines {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}
.account-alert-line,
.failure-source-line {
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: #f0cf79;
  background: rgba(0, 0, 0, 0.22);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.account-alert-source { display: block; }
.account-alert-reason {
  display: block;
  margin-top: 7px;
  color: #c8ced8;
  font-family: inherit;
  font-size: 10px;
}
.account-alert-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.alert-copy {
  border: 1px solid rgba(255, 211, 107, 0.3);
  color: #f2d88f;
  background: rgba(255, 211, 107, 0.07);
}
.alert-copy:hover:not(:disabled) { background: rgba(255, 211, 107, 0.13); }

@media (max-width: 720px) {
  .download-grid { grid-template-columns: 1fr; }
  .guide-index { grid-template-columns: 1fr; }
  .download-scope {
    align-items: stretch;
    flex-direction: column;
  }
  .download-scope-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .health-check-card { grid-template-columns: 1fr; }
  .health-check-button { width: 100%; }
  .account-alert { padding: 21px 16px; }
  .account-alert-actions { display: grid; grid-template-columns: 1fr; }
  .account-alert-actions .button { width: 100%; }
}
