.page-title {
  margin: 0 0 8px 0;
  font-size: 38px;
  font-weight: 600;
  color: var(--text);
}

.page-desc {
  margin: 0 0 18px 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 17.5px;
}

.actions {
  margin: 6px 0 18px 0;
}

.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.btn:hover {
  background: rgba(109, 71, 21, 0.06);
}

.chart-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 18px;
}

.chart-wrap {
  /*height: 360px;*/
  width: 100%;
  height: 380px;
  max-width: 2500px;     /* increase this if you want more space */
  margin: 32px auto;
  padding: 16px 20px;
}

.range-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 4px;
}

.range-pills::-webkit-scrollbar {
  display: none;
}

.range-pill {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 150ms ease;
}

.range-pill:hover {
  color: var(--text);
}

.range-pill.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cards-all {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.day-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
}

.day-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.day-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.9;
  font-size: 14px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: var(--text);
}

.tool-breakdown {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.tool-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}

.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.tool-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  line-height: 1.9;
}

.tool-name {
  color: var(--muted);
}

.tool-time {
  flex: none;
}

/* ── "View more" button — matches the site's .btn ─ */
.view-more {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 150ms ease;
}

.view-more:hover {
  background: rgba(109, 71, 21, 0.06);
}

/* ── Focused card modal ──────────────────────── */
.tool-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.tool-modal.open {
  opacity: 1;
  pointer-events: all;
}

.tool-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
  transform: scale(0.96);
  transition: transform 220ms ease;
}

.tool-modal.open .tool-modal-card {
  transform: scale(1);
}

.tool-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.tool-modal-close:hover {
  background: var(--bg);
  color: var(--text);
}

/* the cloned detail node is unhidden inside the modal */
.tool-modal-body .day-card-detail[hidden] {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .tool-modal,
  .tool-modal-card {
    transition: none;
  }
  .tool-modal-card {
    transform: none;
  }
}

@media (max-width: 980px) {
  .cards, .cards-all {
    grid-template-columns: 1fr;
  }
  .chart-wrap {
    height: 300px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .chart-card {
    padding: 12px;
  }
  .chart-wrap {
    height: 240px;
    margin: 18px auto;
    padding: 8px 4px;
  }
  .page-title {
    font-size: 25px;
  }
}

/* iPad landscape gap (see layout.css) */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (min-width: 980px) and (max-width: 1400px) {
  .page-title {
    font-size: 27px;
  }
  .page-desc {
    font-size: 15.5px;
  }
  .chart-wrap {
    height: 320px;
  }
  .cards, .cards-all {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

