/*
 * Results (tab=results): the mock's chapter 7 rules for the whole site over
 * time, the pages then and now, the searches tracked and the work log
 * (test-harness/mock-storybook/chapters/ch7.py, CSS and RANKS_CSS). The rules
 * the kit already shares (cards, tables, pills, the work cards, the side
 * column) are in agent-surface.css.
 */

/* The whole site, on top */
.cp-rhead { display: grid; grid-template-columns: 1fr 330px; background: #fff; border: 1px solid var(--cp-border); border-radius: 12px; box-shadow: var(--cp-shadow-1); margin-bottom: 18px; overflow: hidden; }
.cp-rhead__chart { padding: 16px 12px 6px 16px; }
.cp-rhead__chart h2 { margin: 0 0 2px 8px; padding: 0; font-size: 13px; font-weight: 600; color: var(--cp-muted); letter-spacing: .02em; line-height: normal; }
.cp-rhead__chart svg { display: block; width: 100%; height: auto; }
.cp-chart-empty { margin: 28px 8px 36px; color: var(--cp-muted); font-size: 14px; }
.cp-rhead__side { border-left: 1px solid var(--cp-border-subtle); display: flex; flex-direction: column; }
.cp-rstat { padding: 14px 18px; border-bottom: 1px solid var(--cp-border-subtle); }
.cp-rstat small { display: flex; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--cp-muted); }
.cp-rstat small em { margin-left: auto; font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--cp-faint); }
.cp-rstat b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.cp-rstat b span { font-size: 13px; font-weight: 400; color: var(--cp-muted); letter-spacing: 0; margin-left: 4px; }
.cp-rstat b .cp-rstat__unit { font-size: 15px; font-weight: 600; color: var(--cp-text); margin-left: 5px; }
.cp-rstat__src { display: block; font-size: 11.5px; color: var(--cp-faint); margin-top: 6px; }
.cp-rstat--say { font-size: 13px; line-height: 1.55; color: var(--cp-text-2); border-bottom: 0; }
.cp-rstat--say b { display: inline; font-size: 13px; letter-spacing: 0; margin: 0; }
.cp-rstat--worth { padding: 0 18px 12px; font-size: 12.5px; color: var(--cp-muted); }
.cp-movers { grid-column: 1 / -1; border-top: 1px solid var(--cp-border-subtle); padding: 12px 24px 14px; }
.cp-movers h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; display: flex; }
.cp-movers h3 span { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--cp-faint); }
.cp-weeks { margin-top: 0; }
.cp-weeks td small, .cp-pages td small { display: block; font-size: 11.5px; color: var(--cp-faint); font-weight: 400; }
.cp-weeks th.n, .cp-pages th.n { text-align: right; }

/* Your pages, then and now */
.cp-pages { background: #fff; border: 1px solid var(--cp-border); border-radius: 12px; box-shadow: var(--cp-shadow-1); margin-bottom: 18px; overflow: hidden; }
.cp-pages__h { display: flex; align-items: baseline; padding: 13px 16px 4px; }
.cp-pages__h h3 { margin: 0; font-size: 14px; font-weight: 600; }
.cp-pages__h span { margin-left: auto; font-size: 12px; color: var(--cp-faint); }
.cp-pages .cp-table td b { font-weight: 600; }
.cp-pages .cp-table th { vertical-align: bottom; line-height: 1.3; }
.cp-pages__foot { padding: 9px 16px 12px; border-top: 1px solid var(--cp-border-subtle); font-size: 12.5px; color: var(--cp-muted); line-height: 1.5; }

/* Searches I track for you */
.cp-ranks { background: #fff; border: 1px solid var(--cp-border); border-radius: 12px; box-shadow: var(--cp-shadow-1); margin-bottom: 18px; overflow: hidden; }
.cp-ranks__h { display: flex; align-items: baseline; padding: 13px 16px 4px; }
.cp-ranks__h h3 { margin: 0; font-size: 14px; font-weight: 600; }
.cp-ranks__h span { margin-left: auto; font-size: 12px; color: var(--cp-faint); }
.cp-ranks .cp-table th { vertical-align: bottom; line-height: 1.3; }
.cp-ranks .cp-table td { vertical-align: middle; }
.cp-ranks .cp-table svg { display: block; }
.cp-ranks__none { font-size: 12px; color: var(--cp-faint); }
.cp-ranks__empty { margin: 0; padding: 6px 16px 10px; font-size: 13px; color: var(--cp-muted); }
.cp-ranks__foot { display: flex; align-items: center; gap: 8px; padding: 9px 16px 12px; border-top: 1px solid var(--cp-border-subtle); font-size: 12.5px; color: var(--cp-muted); line-height: 1.5; }
.cp-ranks__foot .cp-btn { margin-left: auto; white-space: nowrap; }
.cp-track { display: inline-block; width: 28px; height: 16px; border-radius: 999px; background: #D1D5DB; position: relative; vertical-align: middle; border: 0; padding: 0; cursor: pointer; }
.cp-track i { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.cp-track.is-on { background: var(--cp-indigo); }
.cp-track.is-on i { left: 14px; }
.cp-track:focus-visible { outline: 2px solid var(--cp-indigo-border); outline-offset: 2px; }

/* Everything I've done */
.cp-log__h { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.cp-log__none { font-size: 13px; color: var(--cp-muted); }
.saiap-admin-page .cp-filters button { font: inherit; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--cp-border); background: #fff; color: var(--cp-text-2); cursor: pointer; line-height: normal; }
.saiap-admin-page .cp-filters button.is-on { background: var(--cp-text); color: #fff; border-color: var(--cp-text); }
.saiap-admin-page .cp-filters button small { color: var(--cp-faint); margin-left: 3px; font-size: inherit; }
.saiap-admin-page .cp-filters button.is-on small { color: #D1D5DB; }
.saiap-admin-page .cp-filters button.r { margin-left: auto; border: 0; background: none; color: var(--cp-muted); font-size: 12px; padding: 5px 0; }
.cp-wc--sched { border-left-color: var(--cp-indigo); }
.cp-wc--live { border-left-color: #CBD0D8; }
.cp-wc__todo { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--cp-warning-text); background: #FFFBEB; border: 1px solid var(--cp-warning-border); border-radius: 999px; padding: 4px 10px; }
.cp-wc__todo svg { width: 13px; height: 13px; }
.cp-wc__note { margin-top: 8px; font-size: 12.5px; color: var(--cp-warning-text); }
.saiap-admin-page .cp-wc__foot a.cp-btn--link { text-decoration: none; }
.saiap-admin-page .cp-wc__foot button.cp-btn { cursor: pointer; }
.cp-wc__foot .cp-btn svg { width: 13px; height: 13px; }

/* When it goes wrong */
.cp-results-error { background: #fff; border: 1px solid var(--cp-border); border-radius: 12px; padding: 16px 20px; font-size: 13.5px; line-height: 1.55; color: var(--cp-text-2); }
.cp-results-error p { margin: 6px 0 0; }
.cp-results-error code { display: block; margin-top: 6px; font-size: 12px; }
.cp-results-loading { font-size: 13px; color: var(--cp-muted); }
.cp-ranks__why { display: block; font-size: 11.5px; color: var(--cp-faint); }
.cp-ranks tr[data-cp-state="off"] td { color: var(--cp-faint); }
.cp-ranks__more { padding: 4px 16px 8px; }

/* "Everything I've done" as one list, grouped by day, one row per item (T560, Christian 2026-10-28; mock ch7 .cp-dl).
   .is-hover is the pointed-at row as the mock draws it (the parity capture sets it; the page itself uses :hover). */
.cp-dl-filters { display: flex; align-items: center; margin: 0 0 10px; }
.cp-dlseg { display: inline-flex; max-width: 100%; overflow-x: auto; padding: 2px; background: var(--cp-surface-2); border: 1px solid var(--cp-border); border-radius: 8px; font-size: 12.5px; }
.saiap-admin-page .cp-dlseg button { font: inherit; white-space: nowrap; padding: 4px 11px; border: 0; border-radius: 6px; background: none; color: var(--cp-muted); cursor: pointer; line-height: normal; }
.saiap-admin-page .cp-dlseg button small { color: var(--cp-faint); margin-left: 3px; font-size: 11.5px; }
.saiap-admin-page .cp-dlseg button.is-on { background: #fff; color: var(--cp-text); font-weight: 500; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.saiap-admin-page .cp-dl-filters .r { margin-left: auto; font: inherit; font-size: 12px; color: var(--cp-faint); border: 0; background: none; padding: 0; cursor: pointer; }
.cp-dl { container-type: inline-size; background: #fff; border: 1px solid var(--cp-border); border-radius: 12px; box-shadow: var(--cp-shadow-1); overflow: visible; margin-bottom: 18px; }
.cp-dl__day { padding: 12px 18px 4px; font-size: 12px; font-weight: 600; color: var(--cp-muted); border-top: 1px solid var(--cp-border-subtle); }
.cp-dl__day:first-child { border-top: 0; }
.cp-dl__row:focus-visible { outline: 2px solid var(--cp-indigo); outline-offset: -2px; }
.cp-dl__row { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto minmax(64px, max-content); align-items: center; column-gap: 12px; padding: 9px 18px; font-size: 13.5px; cursor: default; }
.cp-dl__row + .cp-dl__row { box-shadow: inset 0 1px 0 var(--cp-border-subtle); }
.cp-dl__row:hover, .cp-dl__row:focus-within, .cp-dl__row.is-hover { background: var(--cp-surface-2); }
.cp-dl__row.is-hl { background: var(--cp-indigo-50); }
.cp-dl__ic { grid-column: 1; grid-row: 1; width: 18px; height: 18px; color: var(--cp-faint); align-self: start; margin-top: 1px; }
.cp-dl__ic svg { width: 15px; height: 15px; }
.cp-dl__main { grid-column: 2; grid-row: 1; min-width: 0; }
.cp-dl__t { color: var(--cp-muted); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saiap-admin-page .cp-dl__t a, .cp-dl__name { color: var(--cp-text); font-weight: 500; text-decoration: none; }
.saiap-admin-page .cp-dl__t a:hover, .saiap-admin-page .cp-dl__row:hover .cp-dl__t a, .saiap-admin-page .cp-dl__row.is-hover .cp-dl__t a { text-decoration: underline; text-decoration-color: var(--cp-indigo-border); text-underline-offset: 2px; }
.cp-dl__sub { grid-column: 2 / -1; grid-row: 2; font-size: 12.5px; color: var(--cp-muted); line-height: 1.45; margin-top: 1px; }
.saiap-admin-page .cp-dl__sub a { color: inherit; text-decoration: underline; text-decoration-color: var(--cp-border); text-underline-offset: 2px; }
.saiap-admin-page .cp-dl__sub a.go { color: var(--cp-indigo); text-decoration: none; }
.saiap-admin-page .cp-dl__sub a.go:hover { text-decoration: underline; }
.cp-dl__act { grid-column: 3; grid-row: 1; display: none; align-items: center; gap: 12px; font-size: 12.5px; }
.saiap-admin-page .cp-dl__act a, .saiap-admin-page .cp-dl__act button { font: inherit; color: var(--cp-indigo); white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.saiap-admin-page .cp-dl__act a:hover, .saiap-admin-page .cp-dl__act button:hover { text-decoration: underline; }
.cp-dl__act svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 3px; }
.cp-dl__row:hover .cp-dl__act, .cp-dl__row:focus-within .cp-dl__act, .cp-dl__row.is-hover .cp-dl__act { display: inline-flex; }
.cp-dl__pill { grid-column: 4; grid-row: 1; position: relative; justify-self: end; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1; padding: 4px 9px; border-radius: 999px; background: var(--cp-surface-2); color: var(--cp-text-2); border: 1px solid var(--cp-border-subtle); white-space: nowrap; }
.cp-dl__pill i { width: 6px; height: 6px; border-radius: 50%; background: #9CA3AF; flex: none; }
.cp-dl__pill--in i { background: var(--cp-text-2); }
.cp-dl__pill--sched { background: var(--cp-indigo-50); color: var(--cp-indigo-600); border-color: var(--cp-indigo-soft); }
.cp-dl__pill--sched i { background: var(--cp-indigo); }
.cp-dl__pill--wait { background: #FFFBEB; color: var(--cp-warning-text); border-color: var(--cp-warning-border); }
.cp-dl__pill--wait i { background: var(--cp-warning); }
.cp-dl__tip { display: none; position: absolute; z-index: 5; right: 0; top: calc(100% + 8px); width: 280px; white-space: normal; background: var(--cp-text); color: #fff; font-size: 12px; line-height: 1.5; padding: 8px 10px; border-radius: 6px; box-shadow: var(--cp-shadow-2); }
.cp-dl__row:hover .cp-dl__tip, .cp-dl__row:focus-within .cp-dl__tip, .cp-dl__row.is-hover .cp-dl__tip { display: block; }
.cp-dl__time { grid-column: 5; grid-row: 1; justify-self: end; font-size: 12px; color: var(--cp-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.saiap-admin-page .cp-dl__more { display: block; width: 100%; text-align: left; font: inherit; padding: 10px 18px 12px; border: 0; border-top: 1px solid var(--cp-border-subtle); background: none; font-size: 12.5px; color: var(--cp-indigo); cursor: pointer; }
@container (max-width: 560px) {
  .cp-dl__day { padding: 12px 14px 4px; }
  .cp-dl__row { grid-template-columns: 18px minmax(0, 1fr) auto; padding: 10px 14px; row-gap: 5px; align-items: start; }
  .cp-dl__t { white-space: normal; }
  /* No pointer to point with: Undo, Revert and Ask about this stay on their own line under the row. */
  .cp-dl__act, .cp-dl__row .cp-dl__act { display: inline-flex; grid-column: 2 / -1; grid-row: 4; }
  .cp-dl__pill { grid-column: 2; grid-row: 2; justify-self: start; }
  .cp-dl__time { grid-column: 3; grid-row: 1; padding-top: 2px; }
  .cp-dl__main { grid-column: 2; grid-row: 1; }
  .cp-dl__sub { grid-column: 2 / -1; grid-row: 3; margin-top: 0; }
}

/* Results on a phone: the list and the side column stack, so nothing runs past the screen (seen on the pilot, 2026-10-28). */
.cp-worktab > div { min-width: 0; }
@media (max-width: 782px) { .cp-worktab { grid-template-columns: minmax(0, 1fr); } }
