/* Owned by stream T (Tracker). Day, Questions and History pages (tracker.js). Tokens from styles.css. */

.t-page { max-width: 880px; margin: 0 auto; padding: 12px 16px 64px; animation: rise .45s var(--ease) both; }
.t-head { margin: 0 0 18px; }
.t-title { margin: 0; font: 400 var(--fs-title)/1.08 var(--serif); letter-spacing: -0.015em; overflow-wrap: anywhere; }
.t-facts { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--bone-faint); }
.t-h { margin: 0 0 10px; font: 400 var(--fs-xs)/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--bone-faint); }
.t-faint, .t-meta { color: var(--bone-faint); font-size: var(--fs-xs); }
.t-loading, .t-none { color: var(--bone-faint); font: italic 400 var(--fs-lg) var(--serif); margin: 0 0 8px; }
.t-error { color: var(--rose); font-size: var(--fs-sm); margin: 0 0 12px; }
.t-foot { margin: 24px 0 0; font-size: var(--fs-sm); color: var(--bone-faint); }
.t-grow { flex: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.t-card { margin: 0 0 20px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line-card); background: var(--card); }
details.t-card > summary { cursor: pointer; color: var(--bone-dim); font-size: var(--fs-md); min-height: 28px; }
details.t-card[open] > summary { margin-bottom: 8px; }

/* Header: stepper and links */
.t-stepper { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 10px; }
.t-step { display: inline-grid; place-items: center; min-width: var(--tap); min-height: var(--tap); font-size: 22px; color: var(--bone-dim); border-radius: var(--radius-sm); }
.t-step.off { opacity: .3; }
@media (hover: hover) { a.t-step:hover { color: var(--bone); background: var(--ink-2); } }
.t-link { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--sea); font-size: var(--fs-md); }
.t-pick { position: relative; display: inline-flex; align-items: center; min-height: var(--tap); color: var(--sea); font-size: var(--fs-md); cursor: pointer; }
.t-pick input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.t-pick:focus-within { outline: 2px solid var(--sea-ring); outline-offset: 2px; border-radius: var(--radius-xs); }

/* Questions on a day */
.t-qs { display: flex; flex-direction: column; gap: 22px; }
.t-qt { margin: 0 0 8px; font: 400 var(--fs-2xl)/1.3 var(--serif); }
.t-qt.dim, .t-qname.dim { color: var(--bone-dim); }
.t-choice { display: flex; gap: 4px; padding: 3px; border-radius: var(--radius-sm); background: var(--ink-2); }
.t-choice.col { flex-direction: column; }
.t-opt { flex: 1; min-height: var(--tap); padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--bone-dim); font-size: var(--fs-md); text-align: center; }
@media (hover: hover) { .t-opt:not(.on):hover { color: var(--bone); background: var(--ink-3); } }
.t-opt.on { background: var(--sea); color: var(--ink-1); }
.t-opt:active { transform: scale(.98); }
.t-src { margin-top: 6px; font-size: var(--fs-xs); color: var(--bone-faint); }
.t-src:empty { display: none; }
.t-field { display: block; width: 100%; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--ink-3); background: var(--ink-2);
  color: var(--bone); font-size: var(--fs-lg); line-height: 1.4; resize: none; overflow-y: auto; }
.t-field:focus { outline: none; border-color: var(--sea-ring); }

/* Notes */
.t-note { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; }
.t-note-body { flex: 1; min-width: 0; }
.t-note-text { font-size: var(--fs-lg); white-space: pre-wrap; overflow-wrap: anywhere; }
.t-meta { margin-top: 3px; }
.t-menuwrap { position: relative; flex: none; }
.t-dots { min-width: var(--tap); min-height: var(--tap); border: 0; background: none; color: var(--bone-faint); font-size: 18px; border-radius: var(--radius-sm); }
@media (hover: hover) { .t-dots:hover { color: var(--bone); background: var(--ink-2); } }
.t-menu { position: absolute; right: 0; top: 100%; z-index: 20; min-width: 150px; display: flex; flex-direction: column; padding: 4px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--ink-1); box-shadow: 0 8px 28px var(--scrim); }
.t-menu[hidden] { display: none; }
.t-menu button { min-height: 40px; padding: 8px 12px; border: 0; background: none; text-align: left; font-size: var(--fs-md); color: var(--bone); border-radius: var(--radius-xs); }
.t-menu button.warn { color: var(--rose); }
@media (hover: hover) { .t-menu button:hover { background: var(--ink-2); } }
.t-addnote { display: flex; align-items: flex-end; gap: 10px; margin-top: 10px; }
.t-send { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--sea); color: var(--ink-0); font-size: 16px; }
.t-send[hidden] { display: none; }
.t-actions { display: flex; gap: 10px; margin-top: 10px; }
.t-small { padding: 8px 16px; font-size: var(--fs-md); }

/* Questions page */
.t-qlist { list-style: none; margin: 0; padding: 0; }
.t-qrow { display: flex; align-items: center; gap: 4px; padding: 4px 0; border-top: 1px solid var(--line); }
.t-qrow:first-child { border-top: 0; }
.t-qmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; min-height: var(--tap); padding: 6px 4px; border: 0; background: none; text-align: left; color: var(--bone); }
.t-qname { font-size: var(--fs-lg); overflow-wrap: anywhere; }
.t-qmain .t-meta { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-qtools { display: flex; align-items: center; flex: none; }
.t-mini { min-width: 36px; min-height: 36px; border: 0; background: none; border-radius: var(--radius-xs); color: var(--bone-dim); font-size: 16px; }
.t-mini:disabled { opacity: .25; }
.t-mini.warn { color: var(--rose); }
@media (hover: hover) { .t-mini:not(:disabled):hover, .t-qmain:hover .t-qname { background: var(--ink-2); } }

/* Editor */
.t-dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--ink-1); color: var(--bone); overflow-y: auto; }
.t-dialog::backdrop { background: var(--scrim); }
.t-eform { display: flex; flex-direction: column; gap: 8px; }
.t-lab { margin-top: 8px; font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--bone-faint); }
.t-erow { display: flex; align-items: center; gap: 2px; margin-bottom: 6px; }
.t-seg { display: flex; gap: 3px; width: max-content; max-width: 100%; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--pill); }
.t-seg button, .t-seg a { padding: 7px 16px; border: 0; background: none; border-radius: var(--pill); color: var(--bone-dim); font-size: var(--fs-sm); white-space: nowrap; }
.t-seg .on { background: var(--sea-deep); color: var(--bone); }
@media (hover: hover) { .t-seg a:not(.on):hover, .t-seg button:not(.on):hover { color: var(--bone); } }

/* History */
.t-head > .t-seg { margin-top: 14px; }
.t-hstep { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.t-ptitle { flex: 1; margin: 0; text-align: center; font: 400 var(--fs-h3)/1.2 var(--serif); }
.t-sum { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--bone-dim); }
.t-answer { font-size: var(--fs-base); }
.t-sumline { margin: 18px 0 0; font-size: var(--fs-sm); color: var(--bone-dim); }
.t-tag { display: inline-block; padding: 4px 8px; border-radius: var(--radius-xs); font-size: var(--fs-xs); line-height: 1.25; background: color-mix(in srgb, currentColor 14%, transparent); }
.t-tag.big { padding: 5px 10px; font-size: var(--fs-md); }
.t-tag.t0 { color: var(--sea); } .t-tag.t1 { color: var(--rose); } .t-tag.t2 { color: var(--moon); } .t-tag.t3 { color: var(--bone-dim); }
.t-dash { color: var(--bone-faint); opacity: .6; font-size: var(--fs-sm); }
.t-n { font-size: var(--fs-xs); color: var(--bone-dim); font-variant-numeric: tabular-nums; }

/* The table scrolls inside its own card, never the page; the date column stays. */
.t-tablecard { margin: 0 0 20px; border-radius: var(--radius); border: 1px solid var(--line-card); background: var(--ink-1); overflow: hidden; }
.t-scroll { overflow-x: auto; overscroll-behavior-x: contain; max-width: 100%; }
.t-grid { border-collapse: collapse; table-layout: fixed; width: 100%; }
.t-grid col.c-date { width: 128px; }
.t-grid th, .t-grid td { padding: 0 8px; height: 52px; text-align: left; vertical-align: middle; font-weight: 400; overflow: hidden; }
.t-grid thead th { height: 54px; vertical-align: bottom; padding-bottom: 6px; font-size: var(--fs-2xs); line-height: 1.25; color: var(--bone-dim); }
.t-grid thead th.t-date { background: var(--ink-1); }
.t-grid .t-date { position: sticky; left: 0; z-index: 1; width: 128px; padding: 0; background: var(--ink-1); }
.t-grid .t-date a { display: flex; align-items: center; height: 52px; padding: 0 12px; font-size: var(--fs-md); color: var(--bone); white-space: nowrap; }
.t-grid .t-date a.today { color: var(--sea); }
.t-grid tbody tr[data-day] { cursor: pointer; }
.t-grid tr.odd td, .t-grid tr.odd th { background: color-mix(in srgb, var(--ink-2) 60%, var(--ink-1)); }   /* the stripe runs through empty cells and the pinned date */
@media (hover: hover) { .t-grid tbody tr[data-day]:hover td, .t-grid tbody tr[data-day]:hover th { background: var(--ink-2); } }
.t-grid tr.t-week th, .t-grid tr.t-week td { height: 26px; border-top: 1px solid var(--ink-3); font-size: var(--fs-2xs); color: var(--bone-faint); padding: 0 12px; }
.t-grid tr.t-week td { padding: 0; }
.t-textcell { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-xs); color: var(--bone-dim); }

@media (max-width: 600px) {
  .t-page { padding: 16px 16px 64px; }
  .t-card { padding: 14px; }
}
