:root {
  color-scheme: light;
  --background: #f5f4f0;
  --background-soft: #faf9f6;
  --surface: #ffffff;
  --surface-muted: #f3f5f1;
  --surface-accent: #edf5ef;
  --border: #dde3dc;
  --border-strong: #b9c6bb;
  --text: #1d2721;
  --text-muted: #58655e;
  --text-soft: #66736c;
  --accent: #397157;
  --accent-strong: #28543f;
  --signal-blue: #0867f2;
  --signal-blue-strong: #075fe4;
  --signal-blue-soft: #eef5ff;
  --signal-blue-border: #4f84dc;
  --signal-blue-glow: rgb(8 103 242 / 16%);
  --focus: var(--signal-blue-strong);
  --danger: #8b302a;
  --danger-surface: #fff1ef;
  --danger-border: #e7aaa4;
  --radius-large: 18px;
  --radius-medium: 12px;
  --shadow: 0 12px 34px rgb(36 48 40 / 7%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgb(221 232 223 / 45%), transparent 28rem),
    var(--background);
  color: var(--text);
  line-height: 1.55;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
.timeline-scroll:focus-visible,
.page-shell:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

code {
  color: var(--accent-strong);
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  transform: translateY(-150%);
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  font-weight: 750;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 82%);
  backdrop-filter: blur(12px);
}

.header-inner,
.page-shell,
.site-footer {
  width: calc(100% - clamp(1rem, 3vw, 3rem));
  max-width: 1920px;
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 8rem;
  padding-block: 1.35rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  line-height: 1.35;
}

.eyebrow {
  margin-bottom: 0.28rem;
  color: var(--accent);
  font-size: 0.71rem;
  font-weight: 820;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.header-description {
  max-width: 43rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

.refresh-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1rem;
  min-width: min(100%, 25rem);
}

.data-meta {
  display: grid;
  gap: 0.12rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: right;
}

.data-meta time {
  color: var(--text);
  font-weight: 750;
}

.refresh-button {
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--signal-blue-border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--signal-blue-strong);
  box-shadow: 0 4px 14px rgb(36 48 40 / 7%);
  font-weight: 750;
  cursor: pointer;
}

.refresh-button:hover:not(:disabled) {
  border-color: var(--signal-blue);
  background: var(--signal-blue-soft);
  box-shadow: 0 0 0 4px rgb(8 103 242 / 9%);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.page-shell {
  min-height: 70vh;
  padding-block: clamp(1.25rem, 4vw, 2.75rem);
}

.page-shell[aria-busy="true"] {
  cursor: progress;
}

.panel {
  padding: clamp(1.1rem, 3vw, 1.7rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 1rem;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 2fr) minmax(0, 3fr);
  align-items: start;
  gap: 1rem;
}

.dashboard-layout > *,
.dashboard-main,
.dashboard-main > * {
  min-width: 0;
}

.initial-state {
  display: grid;
  min-height: 13rem;
  align-content: center;
}

.initial-state p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
}

.alert {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-medium);
  background: var(--danger-surface);
  color: var(--danger);
}

.alert strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #67231e;
}

.alert p {
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}

.section-index {
  display: grid;
  flex: 0 0 auto;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border: 1px solid var(--signal-blue-border);
  border-radius: 50%;
  background: var(--signal-blue-soft);
  color: var(--signal-blue-strong);
  font-size: 0.75rem;
  font-weight: 850;
}

.section-context {
  margin: -0.45rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.timeline-scroll {
  max-width: 100%;
  padding: 0.25rem 0.2rem 0.75rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
}

.timeline,
.card-list,
.todo-list {
  margin: 0;
}

.timeline,
.card-list {
  padding: 0;
  list-style: none;
}

.timeline {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: stretch;
}

.timeline-item {
  position: relative;
  display: flex;
  flex: 1 0 13.5rem;
  min-width: 0;
  padding: 2.15rem 0.5rem 0;
  scroll-snap-align: start;
}

.timeline-item::before {
  position: absolute;
  top: 0.55rem;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--border-strong);
  content: "";
}

.timeline-item:first-child::before {
  left: 50%;
}

.timeline-item:last-child::before {
  right: 50%;
}

.timeline-marker {
  position: absolute;
  z-index: 1;
  top: 0.08rem;
  left: 50%;
  width: 1rem;
  height: 1rem;
  transform: translateX(-50%);
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--border-strong);
  box-shadow: 0 0 0 1px var(--border-strong);
}

.timeline-item-completed .timeline-marker {
  background: var(--accent);
}

.timeline-item-blocked .timeline-marker {
  background: #a84940;
  box-shadow: 0 0 0 1px #a84940;
}

.timeline-card,
.goal-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--background-soft);
}

.timeline-card {
  display: flex;
  width: 100%;
  min-height: 12rem;
  flex-direction: column;
  padding: 1rem;
}

.timeline-item.is-current .timeline-marker {
  width: 1.18rem;
  height: 1.18rem;
  top: -0.01rem;
  background: var(--signal-blue);
  box-shadow: 0 0 0 5px var(--signal-blue-glow);
}

.timeline-item.is-current .timeline-card {
  border-color: var(--signal-blue);
  border-width: 2px;
  background: linear-gradient(180deg, var(--surface), var(--signal-blue-soft));
  box-shadow: 0 10px 28px rgb(8 103 242 / 14%);
}

.roadmap-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-bottom: 0.75rem;
}

.milestone-id {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.roadmap-state {
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 720;
}

.timeline-item.is-current .roadmap-state {
  color: var(--signal-blue-strong);
  font-weight: 820;
}

.timeline-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.item-description {
  margin-bottom: 0;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.current-summary {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgb(8 103 242 / 22%);
}

.current-phase {
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.current-focus {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.75rem;
}

.goal-card {
  height: 100%;
  padding: 0.95rem;
}

.goal-card p:last-child {
  margin-bottom: 0;
}

.item-meta {
  margin-bottom: 0.28rem;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 710;
  overflow-wrap: anywhere;
}

.item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.item-header h3 {
  min-width: 0;
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.badge {
  display: inline-flex;
  min-height: 1.5rem;
  align-items: center;
  padding: 0.16rem 0.48rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.badge::before {
  width: 0.34rem;
  height: 0.34rem;
  margin-right: 0.32rem;
  border-radius: 50%;
  background: currentcolor;
  content: "";
}

.badge-provisional {
  border-color: #d4b56e;
  background: #fff8e7;
  color: #795919;
}

.badge-current,
.badge-progress {
  border-color: #9fc4ad;
  background: #edf7f0;
  color: #2b6548;
}

.badge-completed {
  border-color: #aabfc8;
  background: #f0f6f8;
  color: #315f70;
}

.badge-blocked {
  border-color: #d8aaa5;
  background: #fff1ef;
  color: #8b302a;
}

.todo-panel .section-heading {
  margin-bottom: 0.8rem;
}

.todo-list {
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
  counter-reset: todo;
}

.todo-item {
  display: grid;
  grid-template-columns: 2.45rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
  counter-increment: todo;
}

.todo-item::before {
  padding-top: 0.08rem;
  color: var(--text-soft);
  content: counter(todo, decimal-leading-zero);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.todo-card {
  min-width: 0;
}

.todo-card h3 {
  margin-bottom: 0.45rem;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.todo-details {
  display: grid;
  max-width: 86ch;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.2rem 0.55rem;
  margin: 0;
  font-size: 0.88rem;
}

.todo-detail-label {
  color: var(--signal-blue-strong);
  font-weight: 820;
}

.todo-detail-value {
  margin: 0;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.empty-state {
  padding: 1rem 0;
  color: var(--text-muted);
}

.site-footer {
  padding-block: 0 2rem;
  color: var(--text-soft);
  font-size: 0.81rem;
  text-align: center;
}

.site-footer p {
  margin-bottom: 0;
}

@media (min-width: 1400px) {
  .header-inner {
    min-height: 7rem;
    padding-block: 1rem;
  }

  .page-shell {
    padding-block: 1.25rem 1.75rem;
  }

  .panel {
    padding: 1.35rem;
  }

  .dashboard-main .panel + .panel {
    margin-top: 0.75rem;
  }

  .timeline-card {
    min-height: 10.5rem;
  }
}

@media (max-width: 1280px) {
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.15rem;
  }

  .refresh-panel {
    width: 100%;
  }

  .data-meta {
    text-align: left;
  }

  .timeline-scroll {
    scroll-snap-type: x proximity;
  }
}

@media (max-width: 500px) {
  .header-inner,
  .page-shell,
  .site-footer {
    width: min(100% - 1rem, 1220px);
  }

  .refresh-panel {
    grid-template-columns: 1fr;
  }

  .refresh-button {
    width: 100%;
  }

  .panel {
    padding: 1rem;
    border-radius: 14px;
  }

  .section-heading {
    align-items: flex-start;
    gap: 0.7rem;
  }

  .section-index {
    width: 2.35rem;
    height: 2.35rem;
  }

  .timeline-item {
    flex-basis: min(78vw, 17rem);
  }

  .item-header {
    align-items: stretch;
    flex-direction: column;
  }

  .todo-item {
    grid-template-columns: 1.9rem minmax(0, 1fr);
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
