/* Follow, save and My Exams (Phase 4.4): the box on posts and lists, the device-only pages /saved and /my-exams, and
   the account's lists. Mobile first; fits 320 px. */

/* ---------- The box ---------- */
.fs-box {
  margin: var(--space-3) 0;
}
.fs-box > * + * {
  margin-top: var(--space-2);
}
.fs-box > .fs-note:empty {
  margin-top: 0;
}
.fs-toggle[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-text);
}
.fs-chip {
  max-width: 100%;
}
.fs-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fs-more summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.fs-more[open] summary .icon {
  transform: rotate(180deg);
}
.fs-more .cluster {
  margin-top: var(--space-2);
}
.fs-apply {
  max-width: 28rem;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.fs-links {
  color: var(--text-muted);
}

/* ---------- Lists ---------- */
.fs-page > * + * {
  margin-top: var(--space-4);
}
.fs-section h2 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
}
.fs-list {
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}
.fs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.fs-list .fs-row {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}
.fs-row > a,
.fs-row > span:first-child {
  flex: 1 1 12rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.fs-group + .fs-group {
  margin-top: var(--space-4);
}
.fs-group h3 {
  font-size: var(--text-base);
}
.fs-bullets {
  margin: 0;
  padding-left: var(--space-5);
}

/* ---------- My Exams ---------- */
.fs-exams {
  display: grid;
  gap: var(--space-4);
}
.fs-exam {
  min-width: 0;
  padding: var(--space-4);
}
.fs-exam-head h2 {
  font-size: var(--text-lg);
  overflow-wrap: anywhere;
}
.fs-exam-head > * + * {
  margin-top: var(--space-1);
}
.fs-next {
  font-weight: 600;
  color: var(--brand-text);
}
.fs-timeline {
  margin: var(--space-3) 0;
  padding: 0;
  list-style: none;
}
.fs-step {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  padding: 0 0 var(--space-3) var(--space-6);
}
.fs-step::before {
  content: "";
  position: absolute;
  top: 0.35em;
  left: 0.3rem;
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--surface);
}
.fs-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.2em;
  bottom: 0;
  left: calc(0.3rem + 0.375rem - 1px);
  border-left: 2px solid var(--border);
}
.fs-step.is-done::before {
  border-color: var(--success);
  background: var(--success);
}
.fs-step.is-current::before {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.fs-step-name {
  font-weight: 600;
}
.fs-step-date {
  color: var(--text-muted);
}
.fs-step.is-current .fs-step-date {
  color: var(--text);
}
.fs-step-link {
  font-size: var(--text-sm);
}
.fs-exam-foot {
  align-items: flex-start;
}
.fs-edit[open] {
  flex-basis: 100%;
}
.fs-edit summary {
  list-style: none;
}
.fs-edit form {
  max-width: 28rem;
  margin-top: var(--space-2);
}

/* ---------- Account ---------- */
.fs-feed .input {
  flex: 1 1 14rem;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
.fs-sync:empty {
  display: none;
}
.fs-sync .cluster {
  margin-top: var(--space-2);
}
