:root {
  --bg: #0d0f12;
  --bg-elevated: #14181e;
  --bg-card: #1a1f27;
  --bg-column: #12161c;
  --border: #2a323d;
  --border-soft: #222831;
  --text: #e8edf4;
  --text-muted: #8b97a8;
  --text-faint: #5c6778;
  --accent: #5b9fd4;
  --scope: #8b95a5;
  --started: #e6b35a;
  --completed: #4f8cff;
  --today: #e85d4c;
  --danger: #f07178;
  --radius: 10px;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(91, 159, 212, 0.08), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(230, 179, 90, 0.05), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-optical-sizing: auto;
  line-height: 1.45;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.header {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--started);
}

.header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__summary {
  margin: 8px 0 0;
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.meta {
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--mono);
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn:hover {
  border-color: var(--accent);
  background: #1e2630;
}

.btn--ghost {
  background: transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn--ghost:hover {
  text-decoration: none;
}

.panel {
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 18px 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.panel h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
}

.chip__label {
  color: var(--text-muted);
}

.chip__value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chip--scope .chip__value {
  color: var(--scope);
}

.chip--started .chip__value {
  color: var(--started);
}

.chip--completed .chip__value {
  color: var(--completed);
}

.burnup {
  width: 100%;
  min-height: 280px;
}

.burnup svg {
  width: 100%;
  height: auto;
  display: block;
}

.burnup__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.burnup__legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.burnup__swatch {
  width: 18px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

.milestones {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.milestone {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
}

.milestone__name {
  font-weight: 550;
  font-size: 0.95rem;
}

.milestone__meta {
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--mono);
  text-align: right;
  white-space: nowrap;
}

.ring {
  --p: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: conic-gradient(var(--completed) calc(var(--p) * 1%), var(--border) 0);
  display: grid;
  place-items: center;
}

.ring::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-card);
}

.ring--done {
  background: conic-gradient(#7c5cff 100%, var(--border) 0);
}

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.column {
  background: var(--bg-column);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.column__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px 8px;
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
}

.column__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.column__count {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
}

.status-dot--backlog {
  background: #6b7280;
  box-shadow: inset 0 0 0 1.5px #9ca3af;
  background: transparent;
}

.status-dot--todo {
  border: 1.5px solid #9ca3af;
  background: transparent;
}

.status-dot--in-progress {
  background: var(--started);
}

.status-dot--in-review {
  background: #60a5fa;
}

.status-dot--done {
  background: var(--completed);
}

.column__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  flex: 1;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 11px 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.card__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.card__id {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}

.card__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2b3542;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.card__title {
  margin: 0;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.35;
  color: var(--text);
}

.card__title a {
  color: inherit;
  text-decoration: none;
}

.card__title a:hover {
  color: var(--accent);
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.priority {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}

.priority--1 {
  color: #f87171;
  border-color: #7f1d1d;
}

.priority--2 {
  color: #fb923c;
  border-color: #7c2d12;
}

.label {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--label, var(--border)) 55%, transparent);
  color: var(--text);
  background: color-mix(in srgb, var(--label, #334155) 22%, transparent);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--mono);
}

.child-progress {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.error-banner {
  position: sticky;
  bottom: 16px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #3b1518;
  border: 1px solid #7f1d1d;
  color: #fecaca;
  font-size: 14px;
}

.skeleton {
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    #1a1f27 0%,
    #242b36 45%,
    #1a1f27 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.skeleton--chart {
  height: 280px;
}

.skeleton--board {
  height: 320px;
  grid-column: 1 / -1;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 900px) {
  .board {
    grid-template-columns: repeat(5, minmax(240px, 1fr));
  }

  .milestone {
    grid-template-columns: auto 1fr;
  }

  .milestone__meta {
    grid-column: 2;
    text-align: left;
  }
}
