/* Auto-fix watch dates (preview dialog, /dates card, banner) and the Getting started card. Tokens only. See tidy.js. */
.tf-slot:empty, .gs-slot:empty { display: none; }
.tf-banner { margin-block: var(--s-4) var(--s-2); }

/* preview dialog */
.tf-dlg { display: grid; gap: var(--s-3); width: min(640px, 100%); max-height: calc(100dvh - 120px); overflow-y: auto; padding: var(--s-1) var(--s-1) 0; }
.tf-dlg h2 { margin: 0; font: 800 var(--t-xl)/var(--lh-tight) var(--font-display); font-stretch: 80%; letter-spacing: -0.02em; color: var(--text-strong); }
.tf-dlg h3 { margin: 0; font-size: var(--t-md); color: var(--text-strong); }
.tf-sub { margin: 0; color: var(--mute); font-size: var(--t-sm); line-height: var(--lh-snug); }
.tf-card { display: grid; gap: var(--s-2); padding: var(--s-3) var(--s-4); background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-lg); }
.tf-chead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); }
.tf-chead b { color: var(--text-strong); font-weight: 600; overflow-wrap: anywhere; }
.tf-names { margin: 0; color: var(--text); font-size: var(--t-sm); overflow-wrap: anywhere; }
.tf-seg { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tf-opt { min-height: var(--ctl-sm); padding: 0 var(--s-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--text); font-size: var(--t-sm); font-weight: 600; cursor: pointer; }
.tf-opt:hover:not(:disabled) { border-color: var(--line-strong); }
.tf-opt.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text-strong); }
.tf-opt:disabled { opacity: .45; cursor: not-allowed; }
.tf-months { display: grid; gap: var(--s-2); padding: var(--s-3) var(--s-4); background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--r-lg); }
.tf-mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.tf-mlist li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); font-size: var(--t-sm); }
.tf-mname { color: var(--text-strong); font-weight: 600; }
.tf-bars { display: grid; gap: 3px; min-width: 0; }
.tf-bars i { display: block; height: 6px; border-radius: var(--r-pill); }
.tf-bars .b { background: var(--bad); opacity: .65; }
.tf-bars .a { background: var(--good); }
.tf-mnum { text-align: right; color: var(--mute); white-space: nowrap; }
.tf-mnum s { color: var(--bad); }
.tf-mnum b { color: var(--good); font-weight: 700; }
.tf-mnum small { display: block; color: var(--faint); }
.tf-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); position: sticky; bottom: 0; padding-block: var(--s-3); background: var(--surface-1); }
.tf-dlg .err:empty { display: none; }

/* /dates card */
.tf-panel { display: grid; gap: var(--s-3); padding: var(--s-4); background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--r-lg); }
.tf-phead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.tf-phead > .ic { flex: none; color: var(--accent-hi); }
.tf-phead > div { flex: 1 1 240px; min-width: 0; }
.tf-phead h2 { margin: 0; font-size: var(--t-lg); color: var(--text-strong); }
.tf-phead p { margin: 2px 0 0; color: var(--mute); font-size: var(--t-sm); }
.tf-pref { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.tf-pref > div { flex: 1 1 260px; min-width: 0; display: grid; gap: 2px; }
.tf-pref b { color: var(--text-strong); font-weight: 600; }
.tf-pref small { color: var(--mute); font-size: var(--t-sm); }
.tf-undo { list-style: none; margin: 0; padding: var(--s-3) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--s-2); }
.tf-undo li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); color: var(--text); font-size: var(--t-sm); }

/* Getting started */
.gs { display: grid; gap: var(--s-3); margin-block: var(--s-4); padding: var(--card-pad); background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--r-lg); }
.gs-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.gs-head h2 { margin: 0; font: 800 var(--t-lg)/var(--lh-tight) var(--font-display); letter-spacing: -0.01em; color: var(--text-strong); }
.gs-head p { margin: 2px 0 0; color: var(--mute); font-size: var(--t-sm); }
.gs-bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.gs-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width var(--med) var(--ease); }
.gs-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--s-2); }
.gs-list li { display: flex; align-items: center; gap: var(--s-3); min-width: 0; padding: var(--s-2) var(--s-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.gs-list li.done { opacity: .7; }
.gs-tick { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid var(--line-strong); border-radius: var(--r-pill); color: var(--on-accent); }
.gs-list li.done .gs-tick { background: var(--good); border-color: var(--good); }
.gs-tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.gs-tx b { color: var(--text-strong); font-weight: 600; }
.gs-list li.done .gs-tx b { text-decoration: line-through; text-decoration-color: var(--faint); }
.gs-tx small { color: var(--mute); font-size: var(--t-xs); }
.gs-tips { list-style: none; margin: 0; padding: var(--s-3) 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--t-sm); }
.gs-tips li { display: grid; gap: 1px; }
.gs-tips a, .gs-tips .linkbtn { color: var(--accent-hi); font-weight: 600; text-align: left; }
.gs-tips small { color: var(--mute); }

@media (max-width: 700px) {
  .tf-mlist li { grid-template-columns: 64px minmax(0, 1fr); }
  .tf-mnum { grid-column: 1 / -1; text-align: left; }
  .tf-mnum small { display: inline; }
  .tf-opt, .gs-list .btn, .tf-undo .btn { min-height: 44px; }
  .tf-foot .btn { flex: 1 1 auto; min-height: 44px; }
}
