/* Weekly tracking (monitoring M1). Builds on style.css and billing.css tokens.
   One deliberate moment: the example email slip unfolds on load. Everything
   else moves only in answer to the person's action. */
:root { --fold: 22px; --paper-shadow: 0 1px 0 #11151910, 0 18px 40px -18px #1115193a; }

.monitor-main { max-width: 1120px; padding-top: 48px; }
.monitor-intro { max-width: 620px; margin-bottom: 36px; }
.monitor-intro h1 { font-size: 34px; letter-spacing: 0; }
.monitor-intro p { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
/* Loading: placeholders in the exact shape of "this week" and the app card,
   in the same grid cell as the real layout so the two cross-fade in place. */
.monitor-main { display: grid; grid-template-columns: minmax(0, 1fr); }
.monitor-main > .monitor-loading, .monitor-main > .monitor-layout { grid-row: 2; grid-column: 1; min-width: 0; }
.monitor-main > .monitor-loading { position: relative; z-index: 1; align-self: start; }
.monitor-main[data-loading] > .monitor-layout { display: none; }
.sk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 56px; align-items: start; }
.sk-digest { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; min-width: 0; }
.sk-digest-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.sk-h2 { width: 230px; height: 30px; }
.sk-meta { width: 300px; max-width: 45%; }
.sk-check { height: 43px; margin-top: -8px; border-radius: 8px; }
.sk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.sk-stats > div { display: grid; gap: 10px; align-content: start; padding: 18px 0 14px; }
.sk-stats > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.sk-stats .sk-line { width: 72px; height: 11px; }
.sk-num { width: 52px; height: 36px; }
.sk-block-head { display: grid; gap: 10px; margin-bottom: -6px; }
.sk-block-head .sk-title { width: 110px; }
.sk-block-head .sk-line { width: 72%; }
.sk-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.sk-rows li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(70px, 1fr) 40px 18px; align-items: center; gap: 16px; height: 44px; border-bottom: 1px solid var(--line); }
.sk-rows .sk-line { height: 12px; }
.sk-bar { height: 8px; border-radius: 4px; }
.sk-count { grid-column: 3; justify-self: end; width: 18px; height: 12px; }
.sk-rows .w1 { width: 62%; } .sk-rows .sk-bar.w1 { width: 100%; }
.sk-rows .w2 { width: 48%; } .sk-rows .sk-bar.w2 { width: 66%; }
.sk-rows .w3 { width: 70%; } .sk-rows .sk-bar.w3 { width: 50%; }
.sk-rows .w4 { width: 40%; } .sk-rows .sk-bar.w4 { width: 30%; }
.sk-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 28px; border: 1px solid var(--line); border-radius: 10px; }
.sk-card-head, .sk-card-foot { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; }
.sk-card-name { display: grid; gap: 9px; }
.sk-card-name .sk-title { width: 58%; height: 20px; }
.sk-card-name .sk-line { width: 40%; }
.sk-card-foot .sk-line:first-child { width: 46%; height: 14px; } .sk-card-foot .sk-line:last-child { width: 64%; }
.sk-icon { width: 56px; height: 56px; border-radius: 13px; }
.sk-pill { width: 104px; height: 30px; border-radius: 999px; }
.sk-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.sk-week .sk { height: 46px; border-radius: 8px; }
.sk-card > .sk-line { width: 70%; }
.sk-card-foot { padding-top: 20px; border-top: 1px solid var(--line); }
.sk-switch { width: 48px; height: 28px; border-radius: 999px; }
@media (max-width: 900px) {
  .sk-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sk-card { order: -1; }
}
@media (max-width: 640px) {
  .sk-card { padding: 20px 16px; }
  .sk-stats > div + div { padding-left: 12px; }
  .sk-num { height: 28px; width: 40px; }
  .sk-rows li { grid-template-columns: minmax(0, 1fr) 36px 16px; height: auto; padding: 11px 0; row-gap: 8px; }
  .sk-rows .sk-bar { grid-column: 1 / -1; grid-row: 2; }
  .sk-count { grid-column: 2; grid-row: 1; }
}
.monitor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 56px; align-items: start; }
.monitor-primary { display: grid; gap: 20px; min-width: 0; }
.monitor-status { margin: 0; color: var(--muted); font-size: 14px; }
.monitor-status:empty { display: none; }

/* Panels: the form, gates and the tracked app share one quiet frame. */
.monitor-form, .monitor-gate, .track { border: 1px solid var(--line); border-radius: 10px; padding: 28px; background: var(--paper); }
.monitor-form h2, .monitor-gate h2 { font-size: 20px; }
.monitor-gate p { margin: 10px 0 0; color: var(--muted); max-width: 52ch; }
.monitor-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.monitor-actions:empty { display: none; }

.monitor-form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label, .role-choice legend { font-size: 14px; font-weight: 600; }
.field-note { margin: 0; color: var(--muted); font-size: 13px; }
.field-reveal:not([hidden]) { animation: field-in .24s ease-out; }
@keyframes field-in { from { opacity: 0; transform: translateY(-4px); } }
.form-error { margin: 0; padding: 12px 14px; border-left: 3px solid var(--error-border); background: var(--error-surface); color: var(--error-ink); font-size: 14px; border-radius: 0 5px 5px 0; }
.form-submit { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }

/* Role: two options with a sliding thumb. */
.role-choice { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.segmented { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); max-width: 360px; }
.segmented::before { content: ''; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 5px; background: var(--ink);
  transition: transform .22s cubic-bezier(.3, .7, .2, 1); }
.segmented:has(label:last-child input:checked)::before { transform: translateX(100%); }
.segmented label { position: relative; z-index: 1; display: grid; place-items: center; min-height: 38px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); transition: color .22s; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; min-height: 0; cursor: pointer; }
.segmented label:has(input:checked) { color: var(--accent); }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--accent-ink); outline-offset: 2px; border-radius: 5px; }

/* The tracked app. */
.track { display: grid; gap: 22px; }
.track-enter { animation: track-enter .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes track-enter { from { opacity: 0; clip-path: inset(0 0 100% 0 round 10px); } to { opacity: 1; clip-path: inset(0 0 0 0 round 10px); } }
.track-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.track-icon { width: 56px; height: 56px; border-radius: 13px; object-fit: cover; border: 1px solid var(--line); }
.track-icon-fallback { display: grid; place-items: center; background: var(--surface); color: var(--muted); font-size: 22px; font-weight: 700; }
.track-head h2 { font-size: 21px; }
.track-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.role-tag { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--ink); font-size: 12px; font-weight: 600; }
.role-tag-own { background: var(--accent); border-color: var(--accent); }

.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tone-positive { background: var(--positive-surface); color: var(--positive-ink); }
.tone-warning { background: var(--warning-surface); color: var(--warning-ink); }
.tone-progress { background: var(--lime-wash); color: var(--accent-ink); }
.tone-progress::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }

/* This week, in UTC: the memorable piece of the tracked app. */
.week { display: grid; gap: 10px; }
.week-caption { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 13px; color: var(--muted); }
.week-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) 76px; align-items: stretch; }
.week-day { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 8px 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.week-day b { font-size: 15px; font-weight: 600; color: var(--ink); }
.week-day.is-past b { color: var(--muted); }
.week-day::after { content: ''; position: absolute; left: 0; right: 0; bottom: 14px; height: 2px; background: var(--line); }
.week-day.is-past::after { background: var(--strong-border); }
.week-day.is-today { background: var(--lime-wash); border-radius: 8px; }
.week-day.is-today b { color: var(--accent-ink); }
.week-mark { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; }
.week-mark.updated { background: var(--ink); box-shadow: 0 0 0 3px var(--accent); }
.week-mark.next { border: 2px dashed var(--strong-border); background: var(--paper); }
.week-mail { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 10px 0 0; margin-left: 10px; border-left: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; }
.week-mail .slip { width: 18px; height: 24px; }
.week-mail > span:last-child { display: grid; gap: 1px; }
.week-mail b { color: var(--ink); font-weight: 600; }
.week-mail.is-off .slip::before { background: var(--slip-used); }
.week-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.week-legend li { display: inline-flex; align-items: center; gap: 7px; }
.week-legend .week-mark { width: 10px; height: 10px; margin: 0; }
.track.is-paused .week-row { opacity: .55; filter: grayscale(1); }

.track-times { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.track-times span:last-child { color: var(--muted); }
.schedule-details { margin: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.schedule-details > summary, .result-details > summary, .check-details > summary, .update-evidence > summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 5px 0; }
.schedule-details > summary:hover, .result-details > summary:hover, .check-details > summary:hover, .update-evidence > summary:hover { color: var(--ink); }
.schedule-details[open] .week { margin-block: 16px; }
.track-note { margin: 0; padding: 14px 16px; border-radius: 7px; font-size: 14px; line-height: 1.5; }
.track-note.tone-warning { border-left: 3px solid var(--warning-border); border-radius: 0 7px 7px 0; font-weight: 400; color: var(--ink); }
.track-note.tone-progress { color: var(--ink); }
.track-note.coverage { background: var(--surface); color: var(--ink); }
.track-note .plain-link { margin-left: 6px; }

.track-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.digest-toggle { display: flex; align-items: center; gap: 14px; }
.digest-toggle p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.digest-toggle strong { font-size: 15px; }
.switch { position: relative; flex: 0 0 auto; width: 48px; min-height: 28px; height: 28px; padding: 0; border-radius: 999px; border: 1px solid var(--strong-border); background: var(--slip-used); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px #11151940;
  transition: transform .2s cubic-bezier(.3, .7, .2, 1); }
.switch:hover { background: var(--line); border-color: var(--ink); }
.switch[aria-checked='true'] { background: var(--ink); border-color: var(--ink); }
.switch[aria-checked='true']::after { transform: translateX(20px); background: var(--accent); }
.switch[data-busy='true']::before { display: none; }
.switch[data-busy='true'] { opacity: .6; cursor: wait; }
.remove-button { min-height: 40px; padding: 8px 14px; border-color: transparent; background: transparent; color: var(--error-ink); font-weight: 500; }
.remove-button:hover { background: var(--error-surface); border-color: transparent; color: var(--error-ink); }
.track-error { margin: 0; color: var(--error-ink); font-size: 14px; }
.track .confirm-panel { margin: 0; }

/* Example email: a folded slip, echoing the ReviewFold mark. */
.digest-slip { position: sticky; top: 24px; display: grid; gap: 12px; }
.slip-tag { justify-self: start; margin: 0; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--accent); font-size: 12px; font-weight: 600; }
.slip-shadow { filter: drop-shadow(0 0 1px #1115194d) drop-shadow(0 18px 22px #1115191f); }
.slip-paper { position: relative; padding: 26px 24px 20px; background: var(--paper); border-radius: 3px;
  clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%); transform-origin: top center;
  animation: slip-open .7s cubic-bezier(.2, .7, .2, 1) .1s both; }
.slip-paper::after { content: ''; position: absolute; top: 0; right: 0; width: var(--fold); height: var(--fold); background: var(--accent);
  clip-path: polygon(0 0, 0 100%, 100% 100%); transform-origin: 0 100%; animation: fold-down .45s cubic-bezier(.3, .7, .2, 1) .55s both; }
@keyframes slip-open { from { opacity: 0; transform: translateY(14px) rotate(-1.2deg); } }
@keyframes fold-down { from { transform: scale(0); } }
.slip-head h2 { font-size: 19px; }
.slip-kicker, .slip-heading { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.slip-scope { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.slip-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 0; border-block: 1px solid var(--line); }
.slip-metrics div { padding: 12px 0; }
.slip-metrics div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.slip-metrics dt { color: var(--muted); font-size: 11px; }
.slip-metrics dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.slip-themes { margin-top: 16px; }
.slip-themes ul { display: grid; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.slip-themes li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding-bottom: 7px; font-size: 13px; }
.slip-themes li::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--share); border-radius: 2px; background: var(--ink);
  transform-origin: left; animation: bar-grow .6s cubic-bezier(.2, .7, .2, 1) .75s both; }
.slip-themes li.share-100 { --share: 100%; } .slip-themes li.share-57 { --share: 57%; } .slip-themes li.share-36 { --share: 36%; }
@keyframes bar-grow { from { transform: scaleX(0); } }
.theme-count { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.theme-count em { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 4px; }
.theme-count em.up { color: var(--error-ink); }
.theme-count em.down { color: var(--positive-ink); }
.slip-new { margin-top: 16px; padding: 12px 14px; background: var(--lime-wash); border-radius: 6px; }
.slip-new p:last-child { margin: 0; font-size: 13px; }
.slip-quote { margin: 16px 0 0; padding: 0 0 0 14px; border-left: 3px solid var(--line); }
.slip-quote p { margin: 0; font-size: 13px; }
.slip-quote footer { margin-top: 6px; color: var(--muted); font-size: 12px; }
.stars { color: var(--warning-ink); letter-spacing: 1px; margin-right: 6px; }
.slip-foot { margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--border); color: var(--muted); font-size: 12px; }
.slip-link { text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }
.slip-caption { margin: 0; color: var(--muted); font-size: 12px; }

/* What happens after adding: a real sequence, so it is numbered. */
.monitor-steps { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; counter-reset: step; }
.monitor-steps li { position: relative; display: grid; gap: 2px; padding: 0 0 18px 44px; counter-increment: step; font-size: 14px; }
.monitor-steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%; background: var(--paper); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.monitor-steps li:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 27px; bottom: 1px; width: 1px; background: var(--line); }
.monitor-steps li:last-child { padding-bottom: 0; }
.monitor-steps li:last-child::before { background: var(--accent); border-color: var(--accent); }
.monitor-steps span { color: var(--muted); }

@media (max-width: 900px) {
  .monitor-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .digest-slip { position: static; max-width: 460px; }
}
@media (max-width: 640px) {
  .monitor-main { padding-top: 28px; }
  .monitor-intro h1 { font-size: 28px; }
  .monitor-form, .monitor-gate, .track { padding: 20px 16px; }
  .track-head { grid-template-columns: auto minmax(0, 1fr); }
  .track-head .status-pill { grid-column: 1 / -1; justify-self: start; }
  .week-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .week-mail { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; margin: 8px 0 0; padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .week-mail > span:last-child { display: flex; gap: 6px; }
  .track-controls { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .slip-paper, .slip-paper::after, .slip-themes li::after, .track-enter, .field-reveal:not([hidden]), .tone-progress::before { animation: none; }
  .segmented::before, .switch::after, .segmented label { transition: none; }
}
.track-head h2:focus { outline: none; }
.confirm-danger { border-color: var(--error-border); }

/* ---- Results. Main column: the first check, then "this week so far" with
   the first import underneath. The tracked app moves to the side column and
   the fictional example email folds into a small control there. ---- */
.monitor-latest:empty { display: none; }
.monitor-layout.has-latest { grid-template-columns: minmax(0, 1fr) 372px; grid-template-areas: 'latest side'; }
.monitor-layout.has-latest .monitor-primary { grid-area: side; position: sticky; top: 24px; }
.monitor-layout.has-latest .monitor-primary:has(.digest-slip.is-open) { position: static; }
.monitor-layout.has-latest .monitor-latest { grid-area: latest; }
.monitor-primary { container-type: inline-size; }
@container (max-width: 480px) {
  .track { padding: 22px 20px; gap: 16px; }
  .track-head { grid-template-columns: auto minmax(0, 1fr); }
  .track-head .status-pill { grid-column: 1 / -1; justify-self: start; }
  .track-icon { width: 48px; height: 48px; border-radius: 11px; }
  .week-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .week-mail { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; margin: 8px 0 0; padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .week-mail > span:last-child { display: flex; gap: 6px; }
  .week-day { font-size: 11px; }
  .track-controls { align-items: flex-start; flex-direction: column; }
}

/* Identity before the store answers: the store ID is explained, never shown as a product name. */
.identity-pending { color: transparent; background: linear-gradient(90deg, var(--muted) 0 30%, var(--border) 45%, var(--muted) 60% 100%) 0 0 / 300% 100%;
  background-clip: text; -webkit-background-clip: text; animation: shimmer 2.2s linear infinite; }
.identity-unavailable { color: var(--ink); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.identity-note { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.identity-note a { margin-left: 4px; color: var(--ink); white-space: nowrap; }
.track-icon.is-blank { background:
  radial-gradient(circle at 36% 36%, var(--border) 0 4px, transparent 4.5px), radial-gradient(circle at 64% 36%, var(--border) 0 4px, transparent 4.5px),
  radial-gradient(circle at 36% 64%, var(--border) 0 4px, transparent 4.5px), radial-gradient(circle at 64% 64%, var(--accent-ink) 0 4px, transparent 4.5px), var(--surface); }
.track-icon.is-loading { animation: tile-breathe 1.6s ease-in-out infinite; }
@keyframes tile-breathe { 50% { opacity: .55; } }

.results { display: grid; gap: 28px; min-width: 0; }
.results-enter > * { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.results-enter > :nth-child(2) { animation-delay: .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* The first check: the one dark panel on the page, so the wait is the first
   thing you see. Folded corner as on the email slip. */
.first-check { --corner: 40px; position: relative; display: grid; gap: 16px; padding: 34px 36px 28px; border-radius: 14px 0 14px 14px; background: var(--ink); color: #f4f6f6;
  clip-path: polygon(0 0, calc(100% - var(--corner)) 0, 100% var(--corner), 100% 100%, 0 100%); }
.first-check::after { content: ''; position: absolute; top: 0; right: 0; width: var(--corner); height: var(--corner); background: var(--accent);
  clip-path: polygon(0 0, 0 100%, 100% 100%); transform-origin: 0 100%; animation: fold-down .45s cubic-bezier(.3, .7, .2, 1) .25s both; }
.first-check .eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .2px; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.first-check.state-active .eyebrow-dot, .first-check.state-waiting .eyebrow-dot { animation: pulse 1.6s ease-in-out infinite; }
.first-check.state-failed .eyebrow { color: #f2b860; }
.first-check.state-paused .eyebrow { color: #b9c0c5; }
.first-check h2 { font-size: 30px; letter-spacing: -.6px; color: #fff; max-width: 22ch; }
.first-body { margin: -4px 0 0; max-width: 58ch; color: #c5cbd0; font-size: 15px; }

.first-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0 4px; padding: 0; list-style: none; }
.first-steps li { position: relative; display: grid; gap: 10px; align-content: start; padding-right: 10px; }
.first-steps li:not(:last-child)::after { content: ''; position: absolute; top: 11px; left: 30px; right: 6px; height: 2px; border-radius: 1px; background: #ffffff26; }
.first-steps li[data-state='done']::after { background: var(--accent); }
.first-steps li[data-state='active']::after { background: linear-gradient(90deg, var(--accent), #d0f34100 60%) 0 0 / 200% 100% no-repeat, #ffffff26;
  animation: flow 1.8s ease-in-out infinite; }
@keyframes flow { from { background-position: 100% 0, 0 0; } to { background-position: -100% 0, 0 0; } }
.step-node { position: relative; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #ffffff40; background: var(--ink); }
.first-steps li[data-state='done'] .step-node { border-color: var(--accent); background: var(--accent); }
.first-steps li[data-state='done'] .step-node::before { content: ''; position: absolute; inset: 3px; background: var(--ink); mask: url('/icons/check.svg') center / contain no-repeat; }
.first-steps li[data-state='active'] .step-node { border-color: var(--accent); }
.first-steps li[data-state='active'] .step-node::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }
.first-steps li[data-state='active'] .step-node::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); animation: ring 1.8s cubic-bezier(.2, .7, .2, 1) infinite; }
@keyframes ring { from { opacity: .8; transform: scale(.7); } to { opacity: 0; transform: scale(1.35); } }
.first-steps li[data-state='waiting'] .step-node { border: 2px dashed var(--accent); animation: spin 6s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.first-steps li[data-state='failed'] .step-node { border-color: #f2b860; background: #f2b860; }
.first-steps li[data-state='failed'] .step-node::before { content: '!'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font-size: 13px; font-weight: 800; }
.first-steps li[data-state='paused'] .step-node { border-color: #b9c0c5; }
.first-steps li[data-state='paused'] .step-node::before { content: ''; position: absolute; inset: 6px 7px; border-inline: 3px solid #b9c0c5; }
.step-copy { display: grid; gap: 2px; }
.step-label { font-size: 14px; font-weight: 600; color: #8f979d; }
.first-steps li:is([data-state='done'], [aria-current='step']) .step-label { color: #fff; }
.step-sub { font-size: 12.5px; color: var(--accent); }
.first-steps li[data-state='failed'] .step-sub { color: #f2b860; }
.first-steps li[data-state='paused'] .step-sub { color: #b9c0c5; }
.first-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-top: 16px; border-top: 1px solid #ffffff1f; }
.first-foot p { margin: 0; color: #c5cbd0; font-size: 13px; }
.first-since { font-variant-numeric: tabular-nums; color: #8f979d !important; }

/* This week so far. */
.digest { display: grid; gap: 22px; min-width: 0; }
.digest-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; }
.digest-head h2 { font-size: 28px; letter-spacing: 0; }
.digest-meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.digest-meta span + span::before { content: '·'; margin: 0 10px; }
.check-line { display: flex; align-items: baseline; gap: 10px; margin: -8px 0 0; padding: 11px 14px; border-radius: 8px; background: var(--surface); font-size: 14px; line-height: 1.5; }
.check-line.tone-progress, .check-line.tone-warning { color: var(--ink); }
.check-line.tone-progress { background: var(--lime-wash); }
.check-line.tone-warning { background: var(--warning-surface); }
.check-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--positive-ink); transform: translateY(-1px); }
.tone-progress .check-dot { background: var(--accent-ink); animation: pulse 1.6s ease-in-out infinite; }
.tone-warning .check-dot { background: var(--warning-ink); }
.week-empty { display: grid; gap: 8px; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.week-empty p { margin: 0; }
.week-empty > p:first-child { font-size: 16px; font-weight: 600; }
.week-empty .result-details { order: 2; }
.check-notice { display: grid; gap: 2px; padding: 14px 18px; background: var(--surface); border-left: 3px solid var(--border); }
.check-notice:has(.tone-warning) { background: var(--warning-surface); border-left-color: var(--warning-border); }
.check-notice .check-line { background: none; padding: 0; margin: 0; font-size: 14px; }
.check-details { margin: 0; padding-left: 18px; }
.check-details .latest-notes { padding: 8px 0 0 16px; background: none; }

.latest-intro { margin: 0; color: var(--muted); font-size: 14px; }
.latest-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--ink); }
.latest-stats .stat { padding: 16px 0 14px; min-width: 0; }
.latest-stats .stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.latest-stats dt { color: var(--muted); font-size: 13px; }
.latest-stats dd { margin: 4px 0 0; font-size: 36px; font-weight: 700; letter-spacing: 0; line-height: 1.1; font-variant-numeric: tabular-nums; }
.latest-stats .stat-low.has-value dd { color: var(--error-ink); }
.stat-star { margin-left: 4px; color: var(--warning-ink); font-size: .55em; vertical-align: .55em; }

.latest-block { display: grid; gap: 12px; }
.latest-block-head h3 { font-size: 17px; }
.latest-block-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; max-width: 70ch; }
.classification-summary { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; font-size: 12px; color: var(--muted); }
.classification-summary > div { display: inline-flex; align-items: baseline; gap: 5px; }
.classification-summary dt { order: 1; margin: 0; font-size: 12px; }
.classification-summary dd { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.result-details { margin: -8px 0 0; }
.week-empty .result-details { margin: 0; }
.result-details .latest-notes { margin-top: 6px; }
.kind-chip { flex: 0 0 auto; padding: 1px 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.chip-new { border-color: transparent; background: var(--lime-wash); color: var(--accent-ink); }
.kind-tag { padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.kind-initial { background: var(--ink); color: var(--accent); }

/* Categories: bar, count and the reviews behind it, one click away. */
.category-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.category-item { border-bottom: 1px solid var(--line); }
.category-details { margin: 0; }
.category-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, .8fr) 52px 18px; align-items: center; gap: 12px; min-height: 0; padding: 11px 0; font-size: 14px; }
summary.category-row { list-style: none; cursor: pointer; border-radius: 6px; }
summary.category-row::-webkit-details-marker { display: none; }
summary.category-row:hover .category-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
.category-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.category-title { overflow-wrap: anywhere; }
.category-bar { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.category-bar.is-unknown { visibility: hidden; }
.category-bar span { display: block; height: 100%; width: var(--share); border-radius: 4px; background: var(--ink); transform-origin: left; }
.results-enter .category-bar span { animation: bar-grow .7s cubic-bezier(.2, .7, .2, 1) .2s both; }
.category-details[open] .category-bar span { background: var(--accent-ink); }
.category-count { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.category-count > b { display: block; }
.category-count > small:not(.category-change) { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.category-chevron { width: 16px; height: 16px; justify-self: end; background: var(--muted); mask: url('/icons/chevron-down.svg') center / contain no-repeat; transition: rotate .2s ease; }
details[open] > summary .category-chevron { rotate: 180deg; }
.category-quotes { display: grid; gap: 10px; padding: 2px 0 16px; }
details[open] > .category-quotes, .baseline[open] > .baseline-body { animation: field-in .26s ease-out; }
.more-button { justify-self: start; min-height: 38px; padding: 7px 14px; font-size: 14px; }
.reveal { animation: field-in .24s ease-out; }

/* Review quotes. */
.low-star-list { display: grid; gap: 12px; }
.review-quote { margin: 0; padding: 14px 16px; border-left: 3px solid var(--error-border); background: var(--paper); border-radius: 0 6px 6px 0; box-shadow: inset 0 0 0 1px var(--line); }
.review-quote-compact { padding: 10px 14px; border-left-color: var(--border); background: var(--surface); box-shadow: none; }
.review-quote-compact.is-low { border-left-color: var(--error-border); }
.review-title { margin: 0 0 2px; font-weight: 600; font-size: 14px; }
.review-text { margin: 0; font-size: 14px; }
.review-quote-compact .review-text { font-size: 13.5px; }
.quote-collapsed .review-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.quote-toggle { min-height: 30px; margin-top: 4px; padding: 3px 0; border: 0; border-radius: 0; background: none; color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.quote-toggle:hover { background: none; color: var(--muted); }
.review-quote footer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.review-quote footer .stars { margin: 0; }
.review-quote footer a { color: var(--muted); }
.latest-footnote { margin: 0; color: var(--muted); font-size: 13px; }

.latest-notes { display: grid; gap: 10px; margin: 0; padding: 16px 18px 16px 34px; border-radius: 8px; background: var(--surface); font-size: 13px; color: var(--ink); }
.latest-notes li::marker { color: var(--muted); }
.note-details { margin: 4px 0 0; }
.note-details summary { display: inline-flex; min-height: 28px; padding: 2px 0; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
.note-details .category-quotes { padding: 8px 0 2px; }
.note-details .review-quote-compact { background: var(--paper); }

/* The first import: a fixed starting point, folded away unless it is all there is. */
.baseline { margin: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); transition: border-color .2s; }
.baseline[open] { border-color: var(--border); }
.baseline-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 8px 16px; min-height: 0; padding: 16px 20px; list-style: none; cursor: pointer; border-radius: 8px; }
.baseline-summary::-webkit-details-marker { display: none; }
.baseline-summary:hover { background: var(--surface); }
.baseline[open] > .baseline-summary { border-radius: 8px 8px 0 0; }
.baseline-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; }
.baseline-facts { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.baseline-when { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.baseline-body { display: grid; gap: 22px; padding: 20px; border-top: 1px solid var(--line); }
.baseline-body .latest-stats dd { font-size: 28px; }

/* The example email once an app is tracked: a small dashed control. */
.slip-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.slip-bar .slip-tag { white-space: nowrap; }
.slip-body { display: grid; gap: 12px; }
.slip-toggle { display: none; }
.digest-slip.is-compact { position: static; gap: 0; padding: 10px 12px 10px 14px; border: 1px dashed var(--border); border-radius: 10px; }
.digest-slip.is-compact .slip-toggle { display: inline-flex; min-height: 36px; padding: 6px 4px; gap: 6px; border: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 500; }
.digest-slip.is-compact .slip-toggle:hover { color: var(--accent-ink); }
.slip-toggle .icon { width: 14px; height: 14px; flex-basis: 14px; transition: rotate .2s ease; }
.slip-toggle[aria-expanded='true'] .icon { rotate: 180deg; }
.digest-slip.is-compact .slip-body { display: none; }
.digest-slip.is-compact.is-open .slip-body { display: grid; margin-top: 14px; }

@media (max-width: 900px) {
  /* One column: app card, then results, then the example email last. */
  .monitor-layout.has-latest { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; gap: 24px; }
  .monitor-layout.has-latest .monitor-primary { display: contents; }
  .monitor-layout.has-latest #monitor-track-slot { order: 1; }
  .monitor-layout.has-latest .monitor-latest { grid-area: auto; order: 2; margin-top: 8px; }
  .monitor-layout.has-latest .digest-slip { order: 3; }
  /* While the first check runs, its status is the first thing on the screen. */
  .monitor-layout.has-latest .monitor-latest:has(.first-check) { order: 0; margin-top: 0; }
}
@media (max-width: 640px) {
  .monitor-intro { margin-bottom: 24px; }
  .track { gap: 14px; padding: 16px; }
  .track-head { gap: 10px 12px; }
  .track-controls { gap: 8px; padding-top: 12px; }
  .first-check { --corner: 28px; padding: 26px 20px 22px; }
  .first-check h2 { font-size: 24px; }
  .first-steps { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 6px; }
  .first-steps li { grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 14px; padding: 0; }
  .first-steps li:not(:last-child)::after { top: 30px; bottom: -12px; left: 11px; right: auto; width: 2px; height: auto; }
  .first-steps li[data-state='active']::after { background: #ffffff26; animation: none; }
  .digest-head h2 { font-size: 24px; }
  .latest-stats dt { font-size: 12px; }
  .latest-stats dd, .baseline-body .latest-stats dd { font-size: 26px; }
  .latest-stats .stat + .stat { padding-left: 12px; }
  .category-row { grid-template-columns: minmax(0, 1fr) 48px 16px; gap: 6px 12px; }
  .category-bar { grid-column: 1 / -1; grid-row: 2; }
  .baseline-summary { grid-template-columns: minmax(0, 1fr) 18px; padding: 14px 16px; }
  .baseline-when { grid-row: 2; }
  .baseline-body { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .results-enter > *, .results-enter .category-bar span, .first-check::after, .identity-pending, .track-icon.is-loading,
  .eyebrow-dot, .first-steps li::after, .step-node, .step-node::after, .check-dot,
  details[open] > .category-quotes, .baseline[open] > .baseline-body { animation: none !important; }
  .first-steps li[data-state='active'] .step-node::after { display: none; }
  .category-chevron, .slip-toggle .icon, .baseline { transition: none; }
  .identity-pending { color: var(--muted); background: none; }
}

/* A background re-read changed the state: one soft lime ring, then rest. */
.track-updated { animation: track-updated 1.4s ease-out; }
@keyframes track-updated { 0% { box-shadow: 0 0 0 0 #d0f341; } 30% { box-shadow: 0 0 0 4px #d0f341b3; } 100% { box-shadow: 0 0 0 0 #d0f34100; } }
@media (prefers-reduced-motion: reduce) { .track-updated { animation: none; } }


/* ---- Latest update: a compact card above this week's full distribution. */
.update { display: grid; gap: 14px; padding: 18px 0; border-block: 1px solid var(--line); background: var(--paper); }
.update.has-warning { border-color: var(--warning-border); }
.update-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.update-head h3 { font-size: 16px; }
.update-when { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.update-kind { padding: 2px 9px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; }
.update .check-line { margin: 0; }
.update-evidence { margin: 0; }
.update-evidence .update-block { margin-top: 12px; }
.update-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.update-facts li { display: inline-flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 14px; }
.update-facts b { color: var(--ink); font-size: 22px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.update-facts .fact-low b { color: var(--error-ink); }
.update-quiet { margin: 0; color: var(--muted); font-size: 14px; }
.update-block { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.update-block h4 { font-size: 14px; }
.new-reviews { display: grid; gap: 16px; }
.new-review-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.review-filter { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); font-size: 12px; text-align: left; }
.review-filter > span { min-width: 0; overflow-wrap: anywhere; }
.review-filter b { font-variant-numeric: tabular-nums; }
.review-filter[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.review-filter:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.review-filter:focus-visible, .review-page:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.new-review-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.new-review { display: grid; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.new-review:last-child { padding-bottom: 0; border-bottom: 0; }
.new-review .review-quote { padding: 0; border: 0; background: transparent; }
.new-review .review-text { font-size: 14px; line-height: 1.7; }
.review-themes { display: flex; flex-wrap: wrap; gap: 6px; }
.review-theme { max-width: 100%; padding: 3px 7px; border-radius: 4px; background: var(--surface); color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.new-review-pages { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.new-review-pages > span { margin-right: auto; color: var(--muted); font-size: 12px; }
.review-page { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); }
.review-page:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.page-arrow { width: 16px; height: 16px; background: currentColor; mask: url('/icons/arrow-right.svg') center / contain no-repeat; }
.previous .page-arrow { rotate: 180deg; }
.update-block .latest-footnote { font-size: 12.5px; }
.update-new { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
/* Newly grouped: the brand's folded slip, the one place lime marks "new". */
.new-slip { --c: 16px; position: relative; display: grid; gap: 6px; align-content: start; padding: 14px 16px; border-radius: 8px 0 8px 8px; background: var(--lime-wash);
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, 0 100%); }
.new-slip::after { content: ''; position: absolute; top: 0; right: 0; width: var(--c); height: var(--c); background: var(--accent); clip-path: polygon(0 0, 0 100%, 100% 100%); }
.new-slip-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-right: 8px; }
.new-slip h5 { margin: 0; font-size: 15px; }
.new-slip-meta { margin: 0; color: var(--accent-ink); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.new-slip .review-quote-compact { background: #ffffffb8; }
.touched { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.touched-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 5px 6px 5px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 500; text-align: left; }
.touched-chip b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--surface); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
button.touched-chip { cursor: pointer; transition: border-color .15s, background-color .15s; }
button.touched-chip:hover { border-color: var(--ink); background: var(--paper); color: var(--ink); }
button.touched-chip:hover b { background: var(--accent); }
span.touched-chip { color: var(--muted); }
.touched > li { min-width: 0; max-width: 100%; }
.touched > li:has(.touched-details[open]) { flex-basis: 100%; }
.touched-chip { max-width: 100%; }
.touched-chip > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.touched-chip b, .touched-chip .category-chevron { flex-shrink: 0; }
.touched-details > summary { width: fit-content; list-style: none; cursor: pointer; }
.touched-details > summary::-webkit-details-marker { display: none; }
.touched-details > summary:hover { border-color: var(--ink); }
.touched-details > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.touched-details .category-quotes { padding: 10px 0 0; }
.touched-scope { font-size: 11px; color: var(--muted); }
.touched-more { min-height: 34px; padding: 5px 12px; border: 1px dashed var(--border); border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; }
.touched-more:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
/* A category reached from the update card is pointed out once. */
.category-item.is-pointed { animation: pointed 1.6s ease-out; }
@keyframes pointed { 0%, 30% { background: var(--lime-wash); box-shadow: -10px 0 0 var(--lime-wash), 10px 0 0 var(--lime-wash); } 100% { background: transparent; box-shadow: none; } }
@media (max-width: 640px) {
  .update { padding: 16px 0; }
  .update-facts b { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .category-item.is-pointed { animation: none; outline: 2px solid var(--accent); } button.touched-chip { transition: none; } }

/* ---- Weekly report: one saved digest, read like the email but on the web. */
.weekly-main { max-width: 860px; padding-top: 36px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
.weekly-main > .weekly-loading, .weekly-main > .weekly-report, .weekly-main > .monitor-gate { grid-row: 2; grid-column: 1; min-width: 0; }
.weekly-main > .weekly-loading { position: relative; z-index: 1; align-self: start; }
.weekly-back { display: inline-flex; align-items: center; gap: 8px; justify-self: start; margin-bottom: 22px; color: var(--muted); font-size: 14px; text-decoration: none; }
.weekly-back:hover { color: var(--ink); }
.weekly-back .icon { width: 15px; height: 15px; flex-basis: 15px; transform: rotate(180deg); }
.weekly-report { display: grid; gap: 30px; padding: 0; border: 0; }
/* Undo the report-page article defaults (style.css) for these readers. */
.weekly-report p, .new-slip p { white-space: normal; }
.new-slip { border: 0; }
.weekly-head { display: grid; gap: 6px; padding-top: 14px; border-top: 4px solid var(--accent); }
.weekly-kicker { margin: 0; color: var(--accent-ink); font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.weekly-head h1 { font-size: 36px; letter-spacing: -.8px; }
.weekly-meta { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; font-size: 15px; }
.weekly-meta span + span::before { content: '·'; margin: 0 10px; color: var(--muted); }
.weekly-saved { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.weekly-report .track-note { margin: -10px 0 0; }
.weekly-stats { border-top-width: 2px; }
.weekly-stats .stat-delta { margin: 2px 0 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.worth { display: grid; gap: 10px; padding: 20px 22px; border-radius: 12px; background: var(--lime-wash); }
.worth h2 { font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.worth ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.worth-link { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: baseline; gap: 4px 14px; padding: 8px 10px; margin: 0 -10px; border-radius: 8px; color: var(--ink); text-decoration: none; transition: background-color .15s; }
.worth-link:hover { background: #ffffffb3; color: var(--ink); }
.worth-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.worth li.is-new .worth-label { color: var(--accent-ink); }
.worth-link strong { font-size: 15px; }
.worth-detail { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.weekly-report .latest-block-head h2 { font-size: 19px; }
.category-count small.category-change { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.weekly-unmatched { list-style: none; padding: 16px 18px; }
.weekly-unmatched p { margin: 0; }
.weekly-foot { display: grid; gap: 4px; padding-top: 20px; border-top: 1px solid var(--line); }
.weekly-foot p { margin: 0; color: var(--muted); font-size: 13px; }
.weekly-foot .monitor-actions { margin-top: 16px; }
/* Loading shape: kicker, title, meta, three numbers, highlight panel, rows. */
.sk-weekly { display: grid; gap: 14px; padding-top: 18px; }
.sk-kicker { width: 120px; } .sk-h1 { width: 280px; height: 40px; } .sk-sub { width: 360px; max-width: 80%; }
.sk-weekly .sk-stats { margin-top: 16px; }
.sk-panel { height: 150px; border-radius: 12px; margin-top: 16px; }
.sk-weekly .sk-rows { margin-top: 18px; }
@media (max-width: 640px) {
  .weekly-main { padding-top: 22px; }
  .weekly-head h1 { font-size: 28px; }
  .worth { padding: 16px; }
  .worth-link { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .weekly-meta, .digest-meta { flex-direction: column; }
  .weekly-meta span + span::before, .digest-meta span + span::before { content: none; }
}
@media (prefers-reduced-motion: reduce) { .worth-link { transition: none; } }

/* ---------- weekly reports (sidebar) ---------- */
.weekly-reports { border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: var(--paper); }
.wkr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.wkr-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.wkr-title::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.wkr-count { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }

.wkr-latest {
  position: relative; display: grid;
  padding: 16px 16px 0 18px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fdfcf8 100%);
  text-decoration: none; color: var(--ink); overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wkr-latest:hover { border-color: #c9cfcb; box-shadow: 0 12px 26px -20px rgba(17, 21, 25, 0.4); color: var(--ink); }
.wkr-latest::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 16px; height: 16px;
  background: linear-gradient(135deg, transparent 48%, #efede4 48%);
  border-top: 1px solid #e6e3d8; border-left: 1px solid #e6e3d8;
}
.wkr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wkr-week { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.wkr-badge { padding: 3px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.wkr-range { margin-top: 10px; font-size: 21px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.wkr-app { margin-top: 9px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.wkr-app-name { font-size: 13px; font-weight: 600; }
.wkr-app-scope { font-size: 11px; color: var(--muted); }
.wkr-app-scope::before { content: "·"; margin-right: 8px; color: #c3c8c5; }
.wkr-foot { margin-top: 14px; padding: 10px 0; border-top: 1px dashed #e8e5da; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wkr-generated { font-size: 10px; color: var(--muted); }
.wkr-open { margin-right: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }
.wkr-arrow { display: inline-block; transition: transform 0.18s ease; }
.wkr-latest:hover .wkr-arrow, .wkr-history-link:hover .wkr-arrow, .wkr-history-link:focus-visible .wkr-arrow { transform: translateX(3px); }

.wkr-history { margin-top: 12px; border-top: 1px solid var(--line); }
.wkr-history-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0 9px; cursor: pointer; font-size: 12px; font-weight: 600; list-style: none; }
.wkr-history-summary::-webkit-details-marker { display: none; }
.wkr-history-summary:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: -2px; border-radius: 4px; }
.wkr-chevron { width: 7px; height: 7px; flex: none; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 0.18s ease; }
.wkr-history[open] .wkr-chevron { transform: rotate(-135deg); }
.wkr-history-list { list-style: none; margin: 0; padding: 0; }
.wkr-history-list li { border-top: 1px solid #f1efe6; }
.wkr-history-link { display: grid; grid-template-columns: 30px minmax(0, 1fr) 12px; align-items: center; gap: 10px; padding: 10px 0; text-decoration: none; color: var(--ink); }
.wkr-history-link:hover, .wkr-history-link:focus-visible { color: var(--accent-ink); }
.wkr-week-no { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: #9aa09c; }
.wkr-mid { display: grid; gap: 2px; min-width: 0; }
.wkr-range-sm { font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wkr-app-sm { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wkr-scope-sm::before { content: "·"; margin-right: 6px; color: #c3c8c5; }
.wkr-history-link .wkr-arrow { opacity: 0.35; font-size: 12px; }
.wkr-history-link:hover .wkr-arrow, .wkr-history-link:focus-visible .wkr-arrow { opacity: 1; }

.wkr-empty { display: grid; gap: 6px; }
.wkr-empty::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--accent); margin-bottom: 2px; }
.wkr-empty p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.wkr-empty .wkr-empty-note { font-size: 11.5px; color: #6d7478; }
.wkr-error p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.wkr-retry { min-height: 34px; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--strong-border); background: transparent; color: var(--ink); font-size: 12.5px; font-weight: 600; }
.wkr-retry:hover { background: var(--surface); border-color: var(--ink); }
.wkr-retry:disabled { opacity: 0.6; cursor: wait; }
.wkr-retry:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }

@media (max-width: 900px) { .weekly-reports { padding: 18px; } }
@media (min-width: 1101px) {
  .monitor-layout.has-latest .monitor-primary:has(.weekly-reports:not([hidden])) { position: static; }
}
