:root {
  --start-page-bg: #0d1017;
  --start-panel: #1a2030;
  --start-panel-border: #2a3348;
  --start-text: #e5eaf4;
  --start-muted: #929cb2;
  --start-accent: #5ce1e6;
  --start-ring-empty: #2a3348;
}

.start-view {
  position: relative;
  isolation: isolate;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: clamp(24px, 2.4vw, 38px);
  padding: clamp(18px, 2.4vw, 36px);
  color: var(--start-text);
  background-color: var(--start-page-bg);
  background-image:
    radial-gradient(circle, rgba(224, 240, 255, .42) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(148, 175, 215, .28) 0 1.2px, transparent 2px),
    radial-gradient(circle, rgba(255, 255, 255, .18) 0 .8px, transparent 1.6px);
  background-position: 13px 17px, 83px 61px, 41px 109px;
  background-size: 137px 131px, 211px 197px, 331px 293px;
  scrollbar-color: color-mix(in srgb, var(--start-accent) 45%, transparent) transparent;
}

.start-view::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 44% at 104% -4%, rgba(20, 89, 114, .18), transparent 70%),
    radial-gradient(55% 38% at -8% 46%, rgba(30, 54, 91, .16), transparent 72%);
}

.start-card-link:focus-visible,
.start-list-row:focus-visible,
.start-summary-row:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--start-accent) 70%, white);
  outline-offset: 3px;
}

.start-section {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.start-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.start-section-title h2 {
  margin: 0;
  color: #f1f4fa;
  font-size: clamp(1.35rem, 1.55vw, 1.8rem);
  line-height: 1;
  letter-spacing: -.025em;
}

.start-section-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #1d3c50;
  color: var(--start-accent);
  font-size: 1rem;
  font-weight: 800;
}

.start-section-icon.is-projects::before {
  content: '';
  width: 14px;
  height: 8px;
  border: 2px solid var(--start-accent);
  transform: skewX(-20deg);
}

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

.start-card {
  min-width: 0;
  min-height: clamp(172px, 12vw, 212px);
  display: flex;
  flex-direction: column;
  padding: clamp(12px, 1.25vw, 18px);
  overflow: hidden;
  border: 1px solid var(--start-panel-border);
  border-radius: 16px;
  background: rgba(26, 32, 48, .97);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .2);
}

.start-card-header h3 {
  margin: 0;
  color: var(--start-text);
  font-size: clamp(.9rem, 1vw, 1.05rem);
  line-height: 1.25;
}

.start-card-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  padding: clamp(8px, 1vw, 14px) 0;
}

.start-chart {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(118px, .82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(10px, 1.2vw, 18px);
}

.start-ring {
  justify-self: center;
  width: clamp(118px, 7.8vw, 132px);
  aspect-ratio: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 50%;
}

.start-ring::after {
  content: '';
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  background: var(--start-panel);
  box-shadow: 0 0 0 1px var(--start-panel-border);
}

.start-ring-value,
.start-ring-label {
  position: relative;
  z-index: 1;
  width: 72%;
  text-align: center;
}

.start-ring-value {
  display: block;
  color: var(--start-text);
  font-size: clamp(1rem, 1.2vw, 1.3rem);
  line-height: 1;
  letter-spacing: -.025em;
  white-space: nowrap;
}

.start-ring-value.is-long {
  font-size: clamp(.72rem, .82vw, .9rem);
  letter-spacing: -.045em;
}

.start-ring-value.is-compact {
  font-size: clamp(.66rem, .72vw, .8rem);
  letter-spacing: -.055em;
}

.start-ring-label {
  color: var(--start-muted);
  font-size: .62rem;
  line-height: 1.15;
}

.start-legend {
  min-width: 0;
  display: grid;
  align-content: center;
}

.start-legend-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  border-bottom: 1px solid var(--start-panel-border);
  color: var(--start-text);
  font-size: .74rem;
}

.start-legend-row:last-child { border-bottom: 0; }
.start-legend-row strong { color: var(--start-muted); font-weight: 600; white-space: nowrap; }
.start-legend-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.start-legend-dot { width: 8px; height: 8px; border-radius: 50%; }

.start-list,
.start-summary-list {
  width: 100%;
  display: grid;
  align-content: start;
}

.start-rewards {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(92px, .72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(12px, 1.2vw, 20px);
}

.start-rewards-overview {
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: center;
}

.start-rewards-overview strong {
  color: var(--start-accent);
  font-size: clamp(1.5rem, 2vw, 2.25rem);
  line-height: 1;
}

.start-rewards-overview span {
  color: var(--start-muted);
  font-size: .65rem;
  line-height: 1.25;
}

.start-list-row,
.start-summary-row {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid var(--start-panel-border);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.start-list-row:last-child,
.start-summary-row:last-child { border-bottom: 0; }
.start-list-row:hover,
.start-summary-row:hover { color: var(--start-accent); }

.start-list-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.start-list-main strong,
.start-list-main small {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.start-list-main strong { color: currentColor; font-size: .82rem; }
.start-list-main small { color: var(--start-muted); font-size: .66rem; }

.start-row-value {
  flex: 0 0 auto;
  color: var(--start-text);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.start-status {
  flex: 0 0 auto;
  max-width: 38%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 3px 7px;
  background: #253047;
  color: #c6cfdf;
  font-size: .62rem;
  text-transform: capitalize;
}

.start-empty {
  width: 100%;
  margin: auto 0;
  align-self: center;
  color: var(--start-muted);
  text-align: center;
  font-size: clamp(.82rem, 1vw, 1rem);
  line-height: 1.5;
}

.start-card-link {
  width: 100%;
  margin-top: auto;
  min-height: 34px;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--start-panel-border);
  background: transparent;
  color: var(--start-accent);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color .16s ease, padding-left .16s ease;
}

.start-card-link:hover {
  color: #a4f4f7;
  padding-left: 5px;
}

.start-state {
  min-height: 100%;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--start-muted);
  text-align: center;
}

.start-state-error strong { color: #fb7185; }

body.hkm-start-view #boardToolbarRight { display: none !important; }

@media (max-width: 1180px) {
  .start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .start-card { min-height: 210px; }
}

@media (max-width: 760px) {
  .start-view {
    gap: 24px;
    padding: 16px 14px calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .start-section { gap: 12px; }
  .start-section-icon { flex-basis: 34px; width: 34px; height: 34px; }
  .start-grid { grid-template-columns: 1fr; }
  .start-card { min-height: 210px; padding: 16px; border-radius: 16px; }
}

@media (max-width: 460px) {
  .start-chart {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 12px;
  }

  .start-ring { width: 132px; }
  .start-rewards { grid-template-columns: 1fr; gap: 10px; }
  .start-card:has(.start-chart) { min-height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  .start-card-link { transition: none; }
}
