/* Progress (static/js/progress.js): read checks, track bars, role picker, Continue card, My progress panel and the
   guide "Mark as read" toggle. Hidden elements stay hidden here, so nothing flashes before the script knows the state. */
.lsp-continue[hidden], .lsp-home [hidden], .ah [hidden], .lsp-guide [hidden], .lsp-ran[hidden] { display: none !important; }

/* Continue card (home and Analyze hub) */
.lsp-continue { margin: 0 0 18px; }
.lsp-continue-link { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: var(--radius, 14px); background: var(--surface); color: var(--ink); text-decoration: none; }
.lsp-continue-link:hover b { color: var(--accent); }
.lsp-continue-link:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.lsp-continue-link b { font-size: var(--fs-base); line-height: 1.35; overflow-wrap: anywhere; }
.lsp-kicker { font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.lsp-meta { font-size: var(--fs-xs); color: var(--muted); }

/* Home: role picker */
.lsp-home { padding: 28px 0 8px; }
.lsp-roles { padding: 22px; }
.lsp-roles h2 { margin: 0; font-size: var(--fs-lg); }
.lsp-sub { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-sm); max-width: 70ch; }
.lsp-role-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lsp-role { font-size: var(--fs-sm); font-weight: 650; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line-strong, var(--line));
  background: var(--surface-2); color: var(--ink); text-decoration: none; }
.lsp-role:hover { border-color: var(--accent); }
.lsp-role:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.lsp-role.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.lsp-steps-h { margin: 18px 0 0; font-size: var(--fs-base); }
.lsp-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.lsp-steps li { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.lsp-steps li a { font-weight: 650; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.lsp-steps li a:hover { color: var(--accent); }
.lsp-steps li span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }

/* Home: My progress panel */
.lsp-panel { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.lsp-panel summary { cursor: pointer; font-weight: 650; font-size: var(--fs-sm); color: var(--accent); }
.lsp-panel-body { margin-top: 10px; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--body); }
.lsp-panel-body p { margin: 0; }
.lsp-readlist { margin: 0; padding-left: 18px; columns: 2 260px; font-size: var(--fs-sm); }
.lsp-readlist li { break-inside: avoid; padding: 2px 0; }
.lsp-note { font-size: var(--fs-xs); color: var(--muted); }
.lsp-panel-body button { justify-self: start; margin-top: 6px; }

/* Analyze hub: role highlight, read checks, track bars */
.lsp-badge { display: inline-block; font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; }
.ah-pick .lsp-badge { align-self: flex-start; }
.ah-pick.is-role, .ah-track.is-role { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lsp-track-prog { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.lsp-bar { flex: 1 1 160px; max-width: 280px; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.lsp-bar > span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--tc, var(--accent)); transition: width .3s ease; }
.lsp-count { font-size: var(--fs-xs); font-weight: 650; color: var(--muted); }
.lsp-stars { grid-column: 2; margin-top: 8px; font-size: var(--fs-sm); color: var(--body); }
.lsp-stars a { font-weight: 650; }
.lsp-check { font-weight: 700; color: var(--ok); }
.ah-g.is-read { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }

/* Guide pages: the read toggle and the track line, under the title */
.lsp-guide { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px; }
.lsp-read { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px 7px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong, var(--line)); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); font-weight: 650; }
.lsp-read:hover { border-color: var(--accent); }
.lsp-read:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.lsp-box { width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--muted); display: grid; place-items: center;
  font-size: 11px; line-height: 1; color: #fff; }
.lsp-read.on { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.lsp-read.on .lsp-box { background: var(--ok); border-color: var(--ok); }
.lsp-read.on .lsp-box::after { content: "\2713"; }
.lsp-rec { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); }
.lsp-trk { font-size: var(--fs-xs); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.lsp-trk:hover { color: var(--accent); }

/* SQL recipes: a badge on each recipe that has been run */
.lsp-ran { margin-left: auto; font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  color: var(--ok); padding: 2px 8px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ok) 50%, var(--line)); }

/* Phone width: no horizontal scroll, tighter cards */
@media (max-width: 560px) {
  .lsp-roles { padding: 18px 16px; }
  .lsp-readlist { columns: 1; }
  .lsp-continue-link { padding: 12px 14px; }
}
