/* Daily Trends: hub cards (blog_posts/daily-trends.md) and the day-page TL;DR (_includes/trends_tldr.html).
   Colors come from the post tokens in css/blog_post.css, so both themes work. */

/* ---------- day page ---------- */
.dt-cover { margin: 1.25rem 0 1rem; }
.dt-cover img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); }

.dt-tldr {
  margin: 1rem 0 2rem;
  padding: 1.1rem 1.25rem 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}
.dt-tldr h2 { margin: 0 0 .5rem; font-size: 1.15rem; letter-spacing: .04em; }
.dt-tldr ul { margin: 0; padding-left: 1.15rem; }
.dt-tldr li { margin: .35rem 0; line-height: 1.5; }
.dt-pick {
  margin: .9rem 0 0;
  padding: .7rem .9rem;
  border-radius: 10px;
  background: var(--surface-2);
  line-height: 1.5;
}
.dt-note { margin-top: 2.5rem; font-size: .9rem; color: var(--muted); }

/* ---------- hub ---------- */
.dt-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin: 1.5rem 0 2rem; }
.dt-month { grid-column: 1 / -1; margin: .75rem 0 -.25rem; font-size: 1rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.dt-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--surface);
  transition: transform .15s ease, border-color .15s ease;
}
.dt-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.dt-card-img img { display: block; width: 100%; height: auto; }
.dt-card-body { padding: .9rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.dt-card h3 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.dt-card h3 a { color: var(--text); text-decoration: none; }
.dt-card h3 a:hover { color: var(--accent); }
.dt-card ul { margin: .2rem 0; padding-left: 1.1rem; font-size: .93rem; line-height: 1.45; color: var(--text); }
.dt-card li { margin: .25rem 0; }
.dt-date { margin: 0; font-family: "JetBrains Mono", monospace; font-size: .82rem; color: var(--muted); }
.dt-badge {
  display: inline-block; padding: .05rem .5rem; margin-right: .25rem; border-radius: 999px;
  background: var(--accent); color: var(--bg); font-weight: 600;
}
.dt-tags { margin: .1rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.dt-tags span {
  font-family: "JetBrains Mono", monospace; font-size: .75rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: .05rem .5rem;
}
.dt-more { margin-top: auto; padding-top: .3rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.dt-more:hover { text-decoration: underline; }

/* every day is a full-width row: cover on the left, text on the right; stacks on phones */
.dt-index { grid-template-columns: minmax(0, 1fr); }
.dt-card { flex-direction: row; }
.dt-card-img { flex: 0 0 48%; display: flex; align-items: center; background: var(--surface-2); }
.dt-card-img img { height: auto; }
.dt-latest h3 { font-size: 1.4rem; }

@media (max-width: 760px) {
  .dt-card { flex-direction: column; }
  .dt-card-img { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dt-card { transition: none; }
  .dt-card:hover { transform: none; }
}

/* ---------- highlight of the day, tags, AI note ---------- */
.dt-highlight {
  margin: 0 0 .8rem; padding: .7rem .9rem; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); line-height: 1.5;
}
.dt-hl-label, .dt-card-hl span {
  display: block; font-family: "JetBrains Mono", monospace; font-size: .75rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: .15rem;
}
.dt-card-hl { margin: 0; font-size: .95rem; line-height: 1.4; color: var(--text); }
.dt-tldr .dt-tags { margin-top: .9rem; }
.dt-tags a {
  font-family: "JetBrains Mono", monospace; font-size: .75rem; color: var(--muted); text-decoration: none;
  border: 1px solid var(--border); border-radius: 999px; padding: .05rem .5rem;
}
.dt-tags a:hover { color: var(--accent); border-color: var(--accent); }
.dt-ai { margin: .7rem 0 0; font-size: .82rem; color: var(--muted); }
.dt-ai a { color: var(--muted); }
.dt-note { padding: .9rem 1.1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); line-height: 1.55; }
.dt-note p { margin: 0 0 .5rem; }
.dt-note p:last-child { margin-bottom: 0; }

/* ---------- topic timeline (hub) ---------- */
.dt-timeline-fig { margin: 1rem 0 2rem; }
.dt-timeline-intro { margin: 0 0 .6rem; color: var(--muted); font-size: .92rem; }
.dt-timeline-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.dt-timeline { border-collapse: collapse; width: auto; min-width: 100%; margin: 0; font-size: .85rem; }
.dt-timeline th, .dt-timeline td { padding: .4rem .5rem; border: 0; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; background: transparent; }
.dt-timeline tbody tr:last-child > * { border-bottom: 0; }
.dt-timeline thead th { font-family: "JetBrains Mono", monospace; font-weight: 600; color: var(--muted); }
.dt-timeline thead th a { color: var(--muted); text-decoration: none; display: inline-flex; flex-direction: column; line-height: 1.15; }
.dt-timeline thead th a:hover { color: var(--accent); }
.dt-tl-m { font-size: .68rem; text-transform: uppercase; }
.dt-timeline tbody th { text-align: left; font-family: "JetBrains Mono", monospace; font-weight: 500; color: var(--text); position: sticky; left: 0; background: var(--surface); }
.dt-timeline thead th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.dt-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.dt-dot:hover, .dt-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dt-gap { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--border); vertical-align: middle; }
.dt-tl-n { font-family: "JetBrains Mono", monospace; color: var(--muted); }
.dt-timeline tr:target th { color: var(--accent); }
.dt-timeline tr:target { background: var(--surface-2); }
