/* =========================================================
   DYNASTY — STARTER DASHBOARD
   Pulse, velocity, runway and interactive statistics
   ========================================================= */

.card-grid-5 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clickable-card {
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition:
    border-color var(--ease),
    transform var(--ease),
    background var(--ease);
}

.clickable-card:hover {
  border-color: var(--dynasty-gold);
  transform: translateY(-2px);
}

.clickable-card:focus-visible {
  outline: 2px solid var(--dynasty-gold);
  outline-offset: 3px;
}

.pulse-panel {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--dynasty-panel);
  border: 1px solid var(--dynasty-border);
  border-radius: var(--radius);
  padding: 20px;
  flex-wrap: wrap;
}

.pulse-ring {
  --pulse: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(
    var(--dynasty-gold) calc(var(--pulse) * 1%),
    rgba(255, 255, 255, 0.08) 0
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pulse-ring-inner {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--dynasty-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pulse-ring-inner strong {
  font-size: 18px;
}

.pulse-ring-inner span {
  font-size: 9px;
  color: var(--dynasty-muted);
  text-transform: uppercase;
}

.pulse-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 160px;
}

.pulse-stats div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.pulse-stats span {
  color: var(--dynasty-muted);
}

.velocity-grid,
.runway-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.velocity-grid div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.velocity-grid span {
  font-size: 11px;
  color: var(--dynasty-muted);
}

.velocity-grid strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.runway-form {
  align-items: end;
  margin-bottom: 14px;
}

.runway-result strong {
  font-size: 18px;
  display: block;
  margin-bottom: 4px;
}

.runway-result p {
  font-size: 13px;
}

/* ---------- cash runway ---------- */

.runway-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.runway-form .form-group {
  min-width: 0;
}

.runway-form label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dynasty-muted);
}

.runway-form input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid var(--dynasty-border);
  border-radius: 8px;
  background: var(--dynasty-panel);
  color: var(--dynasty-white);
  font: inherit;
  font-size: 14px;
}

.runway-form input:focus {
  outline: none;
  border-color: var(--dynasty-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.12);
}

.runway-form button {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 140px;
}

.runway-result {
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--dynasty-border);
  min-height: 0;
}

.runway-result:empty {
  display: none;
}

.runway-result strong {
  color: var(--dynasty-gold);
}

.runway-result p {
  margin: 5px 0;
}

.runway-result small {
  display: block;
  margin-top: 8px;
  color: var(--dynasty-muted);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .runway-form {
    grid-template-columns: 1fr;
  }

  .runway-form button {
    grid-column: auto;
    width: 100%;
  }
}


.detail-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--dynasty-border);
  font-size: 13px;
}

.detail-stat:last-child {
  border-bottom: none;
}

.form-group-inline label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--dynasty-white);
}

.form-group-inline input[type="checkbox"] {
  width: auto;
}

/* ---------- responsive layout ---------- */

@media (min-width: 700px) {
  .card-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .pulse-panel {
    padding: 14px;
    gap: 14px;
  }

  .pulse-ring {
    width: 82px;
    height: 82px;
  }

  .pulse-ring-inner {
    width: 64px;
    height: 64px;
  }

  .pulse-ring-inner strong {
    font-size: 16px;
  }

  .pulse-stats {
    min-width: 130px;
  }
}