/* Roadmap layout on the hub shell. Page art, header, and cards come from /ui/shell.css. */

body.dx {
  margin: 0;
  font-family: var(--dx-font);
  color: var(--dx-text);
  background: transparent;
}

.dx-header [data-dong-theme-toggle] {
  position: static;
  flex-shrink: 0;
}

#sync-label {
  display: block;
  max-width: min(34vw, 9.5rem);
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--dx-muted);
}

.dx-card {
  margin: 0 0 var(--dx-gap);
}

.hero h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.goal-when,
.stat-label,
.surplus,
.muted,
.checkin-meta,
.ms-target span,
.when {
  color: var(--dx-muted);
}

.goal-when {
  margin: 6px 0 0;
  font-size: 0.85rem;
}

.stat-num {
  margin: 14px 0 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label,
.surplus {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.surplus b {
  color: var(--dx-text);
  font-variant-numeric: tabular-nums;
}

.bar-block {
  margin-top: 12px;
  min-width: 0;
}

.bar-cap {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 4px;
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.bar-cap span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bar-cap b {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.bar {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--dx-text) 14%, transparent);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--dx-accent);
}

.section-title {
  margin: 18px 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.empty {
  text-align: center;
  color: var(--dx-muted);
  padding: 28px 16px;
}

.empty .big {
  display: block;
  margin-bottom: 6px;
  font-size: 2.2rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: color-mix(in srgb, var(--dx-accent) 45%, transparent);
}

.ms {
  position: relative;
  margin: 0 0 12px;
  padding-left: 28px;
}

.dot {
  position: absolute;
  left: 0;
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dx-card-solid);
  border: 3px solid var(--dx-accent);
  box-sizing: border-box;
}

.ms.done .dot {
  background: var(--dx-accent);
}

.ms.in_progress .dot {
  box-shadow: 0 0 0 4px var(--dx-accent-soft);
}

.ms-card {
  margin: 0;
  min-width: 0;
}

.ms-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ms-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin-bottom: 6px;
}

.when {
  min-width: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.ms-target {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.ms-target span {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
}

.status {
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--dx-border);
  background: var(--dx-card-solid);
  color: var(--dx-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.status.in_progress {
  background: var(--dx-accent-soft);
  border-color: var(--dx-accent);
  color: var(--dx-accent);
}

.status.done {
  background: var(--dx-accent);
  border-color: transparent;
  color: var(--dx-accent-fg);
}

.tasks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.task {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 0;
  border-top: 1px solid var(--dx-border);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.task input {
  width: 22px;
  min-width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--dx-accent);
  cursor: pointer;
}

.task.done span {
  text-decoration: line-through;
  color: var(--dx-muted);
}

.muted {
  margin: 0;
}

.checkin-form {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0 0 12px;
}

.checkin-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dx-muted);
}

.checkin-form input,
.add-btn,
footer .dx-btn {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.checkin-form input {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  border-radius: var(--dx-radius-sm);
  border: 1px solid var(--dx-border);
  background: var(--dx-card-solid);
  color: var(--dx-text);
  padding: 0 12px;
}

.add-btn,
footer .dx-btn {
  width: 100%;
}

.checkin {
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid var(--dx-border);
}

.checkin-date {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.checkin-main {
  margin: 2px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.checkin-meta {
  margin: 2px 0 6px;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.notes {
  margin: 0;
  padding-left: 1.1em;
}

.notes li {
  margin: 4px 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notes li::marker {
  color: var(--dx-accent);
}

footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  width: min(720px, calc(100% - 24px));
  margin: 0 auto;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}

footer[hidden] {
  display: none;
}

button:focus-visible,
input:focus-visible,
.dx-home:focus-visible {
  outline: 2px solid var(--dx-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
