/* Sherpa — Today screen. Look is locked to the approved design (1a,
   outlined walls): black background, teal work cards, mint "now",
   amber "due soon". Deliberately not theme-adaptive to Telegram's
   theme_params — the design wins on aesthetics; we only honor Telegram
   for viewport/safe-area fit. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #e8eeee;
  font-family: Manrope, Helvetica, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mono { font-family: 'JetBrains Mono', monospace; }

/* Header */

.head {
  padding: 20px 20px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f2f7f7;
  line-height: 1.1;
}

.date {
  font-size: 13px;
  color: #98a5a6;
  margin-top: 5px;
}

.stats {
  text-align: right;
  padding-top: 6px;
}

.stats .blocks {
  font-size: 13px;
  font-weight: 600;
  color: #9fadae;
}

.stats .done-by {
  font-size: 12px;
  color: #8a9798;
  margin-top: 4px;
}

/* Mine/Family filter — same chip styling as Tasks' kind filter (.chip/
   .chip.active), reused verbatim so it reads as the same control. */

.filters {
  display: flex;
  gap: 6px;
  padding: 6px 20px 4px;
  overflow-x: auto;
}

.chip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: rgba(0, 73, 83, 0.45);
  color: #7fa8ad;
  -webkit-tap-highlight-color: transparent;
}

.chip.active {
  background: #f2f5f4;
  color: #00181c;
  font-weight: 600;
}

/* Calm-state message (late / empty / tiny / auth) */

.message {
  margin: 8px 20px 4px;
  padding: 14px 16px;
  border: 1px solid #1c1f20;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #b9c5c6;
}

/* Break / day-off name, under the date */
.cal-label {
  margin-top: 4px;
  font-size: 12.5px;
  color: #6fe3d2;
}

.settings-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: #7fa8ad;
  text-decoration: none;
}

/* Kai's progress line / quote / goals — plain text, no colour coding */

.motivation {
  margin: 8px 20px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-line {
  font-size: 14px;
  color: #cfe6e4;
}

.quote-text {
  font-size: 13.5px;
  line-height: 1.45;
  color: #b9c5c6;
  font-style: italic;
}

.quote-person {
  margin-top: 4px;
  font-size: 12px;
  color: #7c8a8b;
}

.goal-note {
  border-left: 2px solid #2b5c62;
  padding: 2px 0 2px 10px;
}

.goal-text {
  font-size: 13px;
  font-weight: 600;
  color: #cfe6e4;
}

.goal-reason {
  margin-top: 2px;
  font-size: 12px;
  color: #93a1a2;
}

.row--goal { margin-bottom: 8px; }

/* Timeline */

.timeline {
  position: relative;
  padding: 4px 20px 10px;
  flex: 1;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 60px;
  top: 8px;
  bottom: 26px;
  width: 1px;
  background: #13181a;
}

.timeline.empty::before { content: none; }

.row {
  display: grid;
  /* minmax(0, 1fr), not 1fr: a bare 1fr grid track won't shrink below
     its content's intrinsic width, so a long label would widen the
     whole page instead of wrapping. */
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  position: relative;
  margin-bottom: 16px;
}

.row:last-child { margin-bottom: 0; }

.row .time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  line-height: 1.55;
  color: #7c8a8b;
  text-align: right;
  padding-top: 17px;
  white-space: nowrap;
}

/* now marker */

.row--now {
  align-items: center;
  margin: -3px 0 16px;
}

.row--now .time {
  padding-top: 0;
  font-weight: 500;
  color: #6fe3d2;
}

.row--now .now-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row--now .now-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6fe3d2;
  margin-left: -2px;
  flex: none;
}

.row--now .now-rule {
  height: 1px;
  flex: 1;
  background: #6fe3d2;
  opacity: .65;
}

.row--now .now-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: #6fe3d2;
}

/* wall (fixed commitment) — outlined treatment */

.row--wall .time { padding-top: 13px; }

.wall {
  border: 1px solid #23282a;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.wall svg { flex: none; }

.wall-label {
  font-size: 14.5px;
  font-weight: 600;
  color: #9aa8a9;
}

/* break */

.row--break {
  align-items: center;
  margin: -4px 0 16px;
}

.row--break .time { padding-top: 0; }

.break-label {
  font-size: 11.5px;
  letter-spacing: .02em;
  color: #8a9899;
}

/* work card */

.row--work .time { padding-top: 17px; }
.row--work { transition: opacity .15s ease; }

.card {
  background: #004953;
  border-radius: 14px;
  padding: 15px 14px 16px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card[data-id] { cursor: pointer; }

.card--current { box-shadow: inset 2px 0 0 #6fe3d2; }

/* mark-done — a plain ring, deliberately not the chevron's style, so the
   two affordances (complete vs. drill in, later) never get confused */
.check-btn {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #6fe3d2;
  background: transparent;
  color: #6fe3d2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.check-btn:active { background: rgba(111, 227, 210, 0.18); }

.check-btn:disabled {
  opacity: .5;
  cursor: default;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #f4fbfa;
  overflow-wrap: break-word;
}

.card-sub {
  font-size: 13.5px;
  color: #cfe6e4;
  overflow-wrap: break-word;
}

.card-meta {
  font-size: 12px;
  color: #93b8b6;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.card-meta .due {
  color: #93b8b6;
}

.card-meta .due--soon {
  color: #ffb257;
  font-weight: 600;
}

.due-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffb257;
  flex: none;
}

.card .chevron { flex: none; }

/* wind-down footer row */

.row--winddown {
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 0;
}

.row--winddown .time {
  padding-top: 0;
  color: #6f7d7e;
}

.winddown-label {
  font-size: 11.5px;
  color: #8a9899;
}

/* Tab bar */

.tabbar {
  margin-top: auto;
  border-top: 1px solid #131617;
  padding: 12px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 4px;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #8b9899;
  text-decoration: none;
}

.tab.active { color: #6fe3d2; font-weight: 600; }

.tab-icon {
  width: 17px;
  height: 17px;
  border: 1.4px solid #6d7a7b;
  border-radius: 4px;
}

.tab.active .tab-icon { border-color: #6fe3d2; }

.tab-fab {
  display: flex;
  justify-content: center;
  text-decoration: none;
}

.tab-fab span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #006d7c;
  color: #eafcfa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  margin-bottom: 4px;
}
