/* Activity — page layout only: the ledger's sticky day heads, hour rules, the time gutter, the phone filter fold. */
@layer page {
  /* Sticky day heads must never cover a focused entry (WCAG 2.4.11). */
  html { scroll-padding-top: calc(var(--top-h) + 72px); }
  .act-day > :first-child { position: sticky; top: var(--top-h); z-index: 5; background: var(--bg); padding-block: var(--s3) var(--s2); margin-bottom: 0; border-bottom: 1px solid var(--line); }
  .act-t { width: 58px; flex: none; text-align: right; font-family: var(--font-mono); font-size: var(--t-cap); color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .act-subj { font-weight: 400; }
  .act-plain, .act-fold { font-weight: 400; }
  .act-sum { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .act-conf { display: block; margin-top: var(--s1); }
  /* Hour rules in the time gutter. */
  .act-hr { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: var(--s4); align-items: center; padding: var(--s2) 0 0; }
  .act-hr span { font: 600 11px var(--font-mono); color: var(--text-3); text-align: right; }
  .act-hr::after { content: ''; height: 1px; background: var(--line); }
  /* The custom range shows only while "Custom range" is the window. */
  #range { display: none; }
  #af:has(#win input[value="range"]:checked) #range { display: block; }
  @media (max-width: 560px) { .act-export { display: none; } }
  /* The ledger's one grid: time + kind · what · who · outcome and id · context link. Below 1340 px the context link lives
     in the receipt drawer only: the ledger drops its column. */
  .act-days { --act-cols: 104px minmax(0, 1fr) 190px 150px 200px; }
  @media (max-width: 1340px) { .act-ctx { display: none; } .act-days { --act-cols: 104px minmax(0, 1fr) 190px 150px; } }
  @media (max-width: 700px) {
    .act-t { width: auto; text-align: left; }
    .act-lead { flex-direction: column; align-items: flex-start; gap: var(--s1); }
    .act-hr { grid-template-columns: 36px minmax(0, 1fr); }
    .act-sum { white-space: normal; }
  }
}
