@font-face {
  font-family: Bricolage;
  src: url(assets/bricolage.ttf) format("truetype");
  font-display: swap;
  font-weight: 200 800;
}
@font-face {
  font-family: Work;
  src: url(assets/worksans.ttf) format("truetype");
  font-display: swap;
  font-weight: 100 900;
}

:root {
  --paper: #f5ecd9;
  --ink: #1a1a1a;
  --muted: #5c5a52;
  --outline: #1a1a1a;
  --yellow: #ffd84d;
  --yellow-dark: #c9a318;
  --green: #3d7a4a;
  --green-light: #8bc49a;
  --todo-bg: #ebe6dc;
  --doing-bg: #fff0a8;
  --doing-text: #5c4a00;
  --done-bg: #c8e6c9;
  --done-text: #1b4d2a;
  --card-bg: #fffdf8;
  --radius: 20px;
  --border: 3px solid var(--outline);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Work, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  padding: 10px 14px;
  background: white;
  border: var(--border);
  border-radius: 12px;
  z-index: 100;
  text-decoration: none;
  color: var(--ink);
}
.skip:focus {
  top: 12px;
}

.top {
  border-bottom: var(--border);
  background: var(--card-bg);
}

.top-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
}

.wordmark {
  font-family: Bricolage, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--ink);
}

.updated {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 20px 48px;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-bottom: 22px;
}

.countdown-pill {
  flex-shrink: 0;
  padding: 12px 20px;
  background: var(--yellow);
  border: var(--border);
  border-radius: 999px;
  font-family: Bricolage, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(15px, 3.5vw, 18px);
  box-shadow: 3px 3px 0 var(--outline);
}

.progress-block {
  flex: 1;
  min-width: min(100%, 220px);
}

.progress-label {
  margin: 0 0 8px;
  font-family: Bricolage, system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
}

.progress-track {
  height: 22px;
  border: var(--border);
  border-radius: 999px;
  background: #e8e2d6;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-light) 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.tab {
  flex-shrink: 0;
  position: relative;
  padding: 12px 18px;
  border: var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  font-family: Bricolage, system-ui, sans-serif;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--outline);
  transition: transform 0.12s, background 0.12s;
}

.tab:hover {
  transform: translateY(-1px);
}

.tab.is-active {
  background: var(--outline);
  color: #fffef8;
}

.tab .badge {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e53935;
  color: white;
  font-family: Work, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  border: 2px solid var(--outline);
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.area-card {
  background: var(--card-bg);
  border: var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 20px 20px 24px;
  box-shadow: 5px 5px 0 var(--outline);
}

.area-title {
  margin: 0 0 18px;
  font-family: Bricolage, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 4.5vw, 28px);
  letter-spacing: -0.03em;
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.task {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 16px;
  padding-top: 18px;
  border-top: 2px solid #e5dfd3;
}

.task-list .task:first-child {
  border-top: none;
  padding-top: 0;
}

.chip {
  align-self: start;
  padding: 5px 10px;
  border: 2px solid var(--outline);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chip-todo {
  background: var(--todo-bg);
  color: var(--muted);
}

.chip-doing {
  background: var(--doing-bg);
  color: var(--doing-text);
}

.chip-done {
  background: var(--done-bg);
  color: var(--done-text);
}

.task-body {
  min-width: 0;
}

.task-title {
  margin: 0 0 6px;
  font-family: Bricolage, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(17px, 3.8vw, 20px);
  line-height: 1.25;
}

.task-title a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.task-title a:hover {
  color: #b63421;
}

.task-meta {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.task-meta strong {
  color: var(--ink);
  font-weight: 650;
}

.task-note {
  margin: 8px 0 0;
  font-size: 15px;
}

.task-blocked {
  margin: 8px 0 0;
  font-size: 14px;
  color: #8b4513;
}

.task-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--yellow);
  border: var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--outline);
}

.download-btn:hover {
  filter: brightness(1.03);
}

.download-btn svg {
  width: 16px;
  height: 16px;
}

.preview-slot {
  grid-column: 1 / -1;
  margin-top: 8px;
  min-height: 140px;
  border: 2px dashed #c4bdb0;
  border-radius: var(--radius);
  background: #f3efe6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-slot img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
}

.preview-placeholder {
  font-size: 14px;
  color: var(--muted);
  padding: 20px;
  text-align: center;
}

.pickup-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pickup-card {
  background: var(--card-bg);
  border: var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 20px 22px 22px;
  box-shadow: 5px 5px 0 var(--outline);
}

.pickup-card--start {
  background: #fff9e8;
  box-shadow: 6px 6px 0 var(--outline);
}

.start-here {
  margin: 0 0 12px;
  display: inline-block;
  padding: 6px 14px;
  background: var(--yellow);
  border: 2px solid var(--outline);
  border-radius: 999px;
  font-family: Bricolage, system-ui, sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pickup-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.pickup-meta {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.pickup-title {
  margin: 0 0 10px;
  font-family: Bricolage, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 4vw, 22px);
  line-height: 1.25;
}

.pickup-action {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.5;
}

.pickup-action-label {
  font-weight: 700;
  color: var(--ink);
}

.linear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background: var(--yellow);
  border: var(--border);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--outline);
}

.linear-btn:hover {
  filter: brightness(1.04);
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
}

.legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--outline);
  border-radius: 4px;
  vertical-align: -2px;
  margin-right: 6px;
}

.legend-francois {
  background: #e8a87c;
}
.legend-agents {
  background: #8eb4d9;
}
.legend-shared {
  background: linear-gradient(135deg, #e8a87c 50%, #8eb4d9 50%);
}
.legend-done {
  background: var(--done-bg);
}
.legend-overdue {
  background: #e57373;
}

.timeline-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding-bottom: 8px;
}

.timeline-chart {
  min-width: min(100%, 720px);
  width: max(100%, 820px);
}

.timeline-axis-wrap {
  display: grid;
  grid-template-columns: minmax(140px, 28%) 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.timeline-axis-spacer {
  min-height: 1px;
}

.timeline-axis {
  position: relative;
  height: 52px;
  border-bottom: 2px solid var(--outline);
  margin-bottom: 4px;
}

.timeline-tick {
  position: absolute;
  bottom: 6px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
}

.timeline-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  z-index: 2;
}

.timeline-marker--today {
  background: var(--outline);
  width: 2px;
}

.timeline-marker--milestone {
  background: #b63421;
  width: 4px;
}

.timeline-marker-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 800;
  font-family: Bricolage, system-ui, sans-serif;
  white-space: nowrap;
  padding: 2px 8px;
  border: 2px solid var(--outline);
  border-radius: 8px;
  background: var(--card-bg);
}

.timeline-marker--milestone .timeline-marker-label {
  background: #b63421;
  color: #fff9ed;
  border-color: var(--outline);
}

.timeline-area .timeline-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-row {
  display: grid;
  grid-template-columns: minmax(140px, 28%) 1fr;
  gap: 12px;
  align-items: center;
}

.timeline-label {
  font-size: 12px;
  line-height: 1.35;
  min-width: 0;
}

.timeline-label a {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--ink);
}

.timeline-label-title {
  display: block;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-track {
  position: relative;
  height: 28px;
  background: #ebe6dc;
  border: 2px solid var(--outline);
  border-radius: 999px;
  overflow: visible;
}

.gantt-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 999px;
  border: 2px solid var(--outline);
  min-width: 6px;
}

.gantt-bar--francois {
  background: #e8a87c;
}

.gantt-bar--agents {
  background: #8eb4d9;
}

.gantt-bar--shared {
  background: linear-gradient(90deg, #e8a87c 0%, #8eb4d9 100%);
}

.gantt-bar--done {
  background: var(--done-bg);
}

.gantt-bar--overdue {
  background: #e57373;
}

.timeline-undated {
  margin-top: 24px;
}

.undated-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.undated-chip {
  display: block;
  padding: 12px 14px;
  border: 2px solid var(--outline);
  border-radius: 14px;
  background: #f3efe6;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.undated-chip:hover {
  background: #ebe6dc;
}

.empty-state {
  padding: 32px 24px;
  text-align: center;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  font-family: Bricolage, system-ui, sans-serif;
  font-size: 20px;
}

.refresh-panel {
  margin-top: 40px;
  padding: 24px;
  border: var(--border);
  border-radius: var(--radius);
  background: #fffaf0;
  box-shadow: 4px 4px 0 var(--outline);
}

.refresh-heading {
  margin: 0 0 10px;
  font-family: Bricolage, system-ui, sans-serif;
  font-size: 22px;
}

.refresh-copy {
  margin: 0 0 16px;
  font-size: 15px;
  max-width: 52ch;
}

.refresh-copy code {
  font-size: 0.92em;
  background: #ebe6dc;
  padding: 2px 6px;
  border-radius: 6px;
}

.refresh-button {
  display: inline-block;
  padding: 14px 22px;
  background: #b63421;
  color: #fff9ed;
  border: var(--border);
  border-radius: 12px;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--outline);
}

.refresh-button:hover {
  filter: brightness(1.05);
}

.refresh-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 32px;
  font-size: 14px;
  color: var(--muted);
}

.footer a {
  color: var(--ink);
  text-underline-offset: 3px;
}

@media (max-width: 520px) {
  .task {
    grid-template-columns: 1fr;
  }
  .chip {
    width: fit-content;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .progress-fill {
    transition: none;
  }
  .tab {
    transition: none;
  }
}
