/* Saved questions and Your activity (web/activity.js, docs/saved.md). Calm study-room pages; tokens only. */

/* the bookmark toggle, wherever it appears */
.save-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-width: 36px; height: 36px; padding: 0 .5rem;
  border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: .88rem; font-weight: 600; }
.save-btn:hover { background: rgb(var(--hl) / .05); color: var(--ink); }
.save-btn.labelled { border-color: var(--rule-2); padding: 0 .75rem; }
.save-btn[aria-pressed="true"] { color: var(--accent); }
.save-btn[aria-pressed="true"] svg { fill: currentColor; }
.save-btn.labelled[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.save-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.q-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.save-inline { display: inline-flex; align-items: center; gap: .2rem; font-weight: 600; color: var(--accent); }
.save-inline svg { width: 15px; height: 15px; vertical-align: -2px; }
.save-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.save-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .2rem .15rem .65rem; border: 1px solid rgb(var(--line-rgb) / .25);
  border-radius: 999px; font-size: .88rem; color: var(--muted); }
.save-chip .num { font-weight: 700; color: var(--ink); }
.save-chip b { color: var(--gold-ink); }
.save-chip .save-btn { height: 30px; min-width: 30px; }

/* the You page's way in */
.pf-activity { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .75rem; margin: 1.25rem 0; }
.pf-activity a { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1.1rem; border-radius: 14px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--rule); color: var(--ink); }
.pf-activity a:hover { border-color: var(--accent); }
.pf-activity span { color: var(--muted); font-size: .9rem; }

/* the page */
.act-page { display: flex; flex-direction: column; gap: 1.1rem; padding-bottom: 3rem; }
.act-page .page-head { margin: 0; }
.act-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--rule); }
.act-tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.act-tabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.act-filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip-filter { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--rule-2);
  background: var(--paper); color: var(--ink); text-decoration: none; font-size: .9rem; }
.chip-filter span { color: var(--faint); font-variant-numeric: tabular-nums; }
.chip-filter.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip-filter.on span { color: var(--accent-ink); opacity: .8; }
.act-empty { text-align: center; padding: 2.5rem 1rem; border: 1.5px dashed var(--rule-2); border-radius: 18px; }
.act-empty h2 { margin: 0 0 .4rem; }
.act-empty p { color: var(--muted); margin: 0 auto 1rem; max-width: 30rem; line-height: 1.55; }

.act-list { list-style: none; margin: 0; padding: 0; }
.act-day h2 { font-family: Inter, system-ui, sans-serif; font-size: .9rem; font-weight: 650; color: var(--muted); margin: 1.2rem 0 .4rem; }
.act-day:first-child h2 { margin-top: 0; }
.act-item { display: flex; align-items: center; gap: .3rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; margin-bottom: .4rem; padding-right: .3rem; }
.act-item > a { flex: 1; min-width: 0; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto 4.5rem; gap: .4rem 1rem; align-items: center;
  padding: .7rem .4rem .7rem 1rem; text-decoration: none; color: var(--ink); }
.act-item:hover { border-color: var(--rule-2); }
.act-type { font-size: .8rem; font-weight: 650; color: var(--accent); }
.t-game .act-type, .t-duel .act-type, .t-tournament .act-type { color: var(--tier-quant); }
.t-contest .act-type { color: var(--gold-ink); }
.t-learn .act-type, .t-report .act-type { color: var(--good); }
.act-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.act-main b { font-weight: 600; overflow-wrap: anywhere; }
.act-main small { color: var(--muted); }
.act-res { font-size: .9rem; color: var(--muted); text-align: right; }
.act-res.good { color: var(--good); } .act-res.bad { color: var(--bad); }
.act-item time { color: var(--faint); font-size: .82rem; text-align: right; }

/* saved */
.sv-group h2 { margin: .4rem 0 .7rem; }
.sv-group h2 small { font-family: Inter, system-ui, sans-serif; font-size: .85rem; font-weight: 500; color: var(--faint); margin-left: .3rem; }
.sv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: .9rem; }
.sv-item { background: var(--paper); border: 1px solid var(--rule); border-radius: 16px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; }
.sv-item.removed { opacity: .5; }
.sv-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: -.3rem -.4rem -.2rem 0; }
.sv-title { text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.sv-statement { margin: 0; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sv-prompt { margin: 0; font-weight: 600; line-height: 1.45; }
.sv-plot { width: 100%; max-width: 300px; height: auto; border-radius: 10px; align-self: center; }
.sv-view { margin: 0; padding: .9rem; border-radius: 12px; background: var(--felt); color: var(--felt-ink); }
.sv-answer summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.sv-answer p { margin: .5rem 0 0; line-height: 1.5; }
.sv-again { font-size: .9rem; font-weight: 600; text-decoration: none; margin-top: auto; }

@media (max-width: 640px) {
  .act-item > a { grid-template-columns: minmax(0, 1fr) auto; }
  .act-type { grid-column: 1 / -1; }
  .act-res { grid-column: 1; text-align: left; }
  .act-item time { grid-row: 3; grid-column: 2; }
}
