/* ==========================================================================
   Swipe Page - Mobile-First Task Cards
   ========================================================================== */

.swipe-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 0.75rem var(--space-3) var(--space-5);
}

/* Filter Bar */
.swipe-filter-bar {
  margin-bottom: 0.75rem;
}

.swipe-filter-select {
  width: 100%;
  padding: var(--space-2) 0.75rem;
  font-family: var(--font-content);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

/* Card Area */
.swipe-card-area {
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* Navigation row: arrows + dots together below card */
.swipe-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0.6rem 0 0.4rem;
}

/* Arrow Buttons — nav-row circles. Given real button weight (LIN-1224): stronger
   border + a resting shadow so they read as pressable, an inverting hover, and a
   distinctly inert disabled state (dashed hairline, no fill/shadow) rather than a
   faint dim that reads as "still clickable". */
.swipe-arrow {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.swipe-arrow:hover:not(:disabled) {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  box-shadow: var(--shadow-md);
}

.swipe-arrow:active:not(:disabled) {
  box-shadow: none;
  transform: translateY(1px);
}

.swipe-arrow:disabled {
  opacity: 0.6;
  cursor: default;
  color: var(--fg-vdim);
  background: transparent;
  border-style: dashed;
  border-color: var(--border);
  box-shadow: none;
}

/* Card Container */
.swipe-card-container {
  overflow: hidden;
  position: relative;
}

/* Card */
.swipe-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--bg);
  will-change: transform, opacity;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: grab;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Dark elevation (LIN-1224): on near-black --bg the S1 hairline border and the
   small shadow both vanish, so the card read as flat. Lift it onto the raised
   --card surface with the stronger border + the theme-aware --shadow-lg (the
   LIN-1046 token family) so the card is a clearly raised panel above the page. */
.theme-dark .swipe-card {
  background: var(--card);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.swipe-card.swiping {
  transition: none;
  cursor: grabbing;
}

.swipe-card.exiting {
  transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}

.swipe-card.entering {
  transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}

.swipe-card-empty {
  font-family: var(--font-content);
  text-align: center;
  color: var(--fg-dim);
  padding: 3rem var(--space-3);
  font-style: italic;
}

/* Status accent bar at top of card — the shared AccentBar primitive
   (.accent-bar / .accent-bar--<state>, public/style.css §Theme S2). State →
   token colour is owned there; no bespoke gradients here. */

/* Card inner content */
.swipe-card-inner {
  padding: var(--space-3) 1.25rem 1.25rem;
}

/* Card Header: status + identifier + position */
.swipe-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  font-family: var(--font-structural);
  font-size: 12px;
}

.swipe-card-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* The state pill converges on the canonical .status-pill component
   (public/style.css); its glyph + state colours are owned there. */

.swipe-card-identifier {
  color: var(--fg-dim);
  font-size: 12px;
}

.swipe-card-position {
  color: var(--fg-dim);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}

/* Card Title */
.swipe-card-title {
  font-family: var(--font-content);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  color: var(--fg);
  word-break: break-word;
  letter-spacing: -0.01em;
}

.swipe-card-title.done {
  text-decoration: line-through;
  opacity: 0.5;
}

/* Card Meta */
.swipe-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 13px;
  color: var(--fg-dim);
  padding-bottom: var(--space-1);
}

.swipe-card-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.swipe-card-meta-label {
  font-family: var(--font-content);
  color: var(--fg-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 56px;
}

.swipe-card-meta-value {
  font-family: var(--font-content);
  color: var(--fg);
  font-size: 13px;
}

/* Priority Dots */
.priority-dots {
  letter-spacing: 1px;
}

.priority-dots .filled { color: var(--fg); }
.priority-dots .empty { color: var(--border); }

/* Label Tags */
.swipe-card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.swipe-label-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 11px;
  font-family: var(--font-content);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg-dim);
  background: var(--bg-muted);
}

/* Blocking Relationship Rows */
.swipe-meta-blocks {
  border: 1px solid var(--red);
  border-radius: var(--radius-md);
  padding: 0.3rem var(--space-2);
  margin-top: 0.15rem;
}
.swipe-meta-blocks .swipe-card-meta-label { color: var(--red-dim); }
.swipe-meta-blocks .swipe-card-meta-value { color: var(--red-dim); }

.swipe-meta-blocked {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.3rem var(--space-2);
  margin-top: 0.15rem;
}
.swipe-meta-blocked .swipe-card-meta-label { color: var(--fg-dim); }

.swipe-blocking-issue {
  font-family: var(--font-structural);
  font-size: 12px;
  color: inherit;
  text-decoration: none;
}

a.swipe-blocking-issue {
  border-bottom: 1px dotted currentColor;
  cursor: pointer;
  transition: opacity 0.15s;
}

a.swipe-blocking-issue:hover {
  opacity: 0.7;
}

/* Parent/Subtask Relationship Rows */
.swipe-meta-parent {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.3rem var(--space-2);
  margin-top: 0.15rem;
}
.swipe-meta-parent .swipe-card-meta-label { color: var(--fg-dim); }

.swipe-meta-subtasks {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.3rem var(--space-2);
  margin-top: 0.15rem;
}
.swipe-meta-subtasks .swipe-card-meta-label { color: var(--fg-dim); }
.swipe-meta-subtasks .swipe-card-meta-value { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem var(--space-2); }

.swipe-relation-issue {
  font-family: var(--font-structural);
  font-size: 12px;
  color: inherit;
  text-decoration: none;
}

a.swipe-relation-issue {
  border-bottom: 1px dotted currentColor;
  cursor: pointer;
  transition: opacity 0.15s;
}

a.swipe-relation-issue:hover {
  opacity: 0.7;
}

.swipe-relation-done { color: var(--green); }
.swipe-relation-in-progress { color: var(--yellow); }
.swipe-relation-todo { color: var(--fg-dim); }
.swipe-relation-backlog { color: var(--fg-vdim); }

/* Expandable Accordion Sections — grouped into Details / Insights / Work
   clusters (LIN-1224) so the stack reads as three scannable groups instead of
   seven identical rows. */
.swipe-accordion-group {
  margin-top: var(--space-3);
}

.swipe-accordion-group:first-of-type {
  margin-top: var(--space-2);
}

/* Group micro-label: a quiet uppercase caption over a slightly stronger rule
   than the inter-row hairlines, so the eye registers the group boundary. */
.swipe-accordion-group-label {
  font-family: var(--font-content);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  padding-bottom: 0.3rem;
  margin-bottom: 0.1rem;
  border-bottom: 1px solid var(--border);
}

.swipe-card-accordion {
  border-top: 1px solid var(--fg-vdim);
}

/* The group label (or the group top, when label-less as on landing) already
   provides the divider, so the first row in a group drops its own top rule. */
.swipe-accordion-group > .swipe-card-accordion:first-child,
.swipe-accordion-group-label + .swipe-card-accordion {
  border-top: none;
}

/* Prompts is the primary triage action — the anchor of the Work group. Frame it
   as a CTA-like panel (bordered, brand-tinted toggle, heavier header) so it is
   visibly the emphasised row rather than one more identical line. */
.swipe-card-accordion--primary {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  margin-top: var(--space-2);
  padding: 0 0.6rem;
}

.swipe-card-accordion--primary .swipe-accordion-header {
  font-weight: 600;
  color: var(--fg);
}

.swipe-card-accordion--primary .swipe-accordion-toggle {
  color: var(--brand);
}

.swipe-accordion-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0;
  cursor: pointer;
  font-family: var(--font-content);
  font-size: 12px;
  color: var(--fg-dim);
  user-select: none;
  -webkit-user-select: none;
  transition: color 0.15s;
}

.swipe-accordion-header:hover {
  color: var(--fg);
}

.swipe-accordion-toggle {
  font-size: 9px;
  transition: transform 0.2s;
}

.swipe-accordion-header.open .swipe-accordion-toggle {
  transform: rotate(90deg);
}

.swipe-accordion-body {
  font-family: var(--font-content);
  display: none;
  padding: var(--space-2) 0 0.75rem;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
  overflow-wrap: break-word;
  word-break: break-word;
}

.swipe-accordion-body.open {
  display: block;
}

/* Markdown content in accordion */
.swipe-accordion-body p { margin: 0 0 var(--space-2); }
.swipe-accordion-body ul,
.swipe-accordion-body ol { margin: 0 0 var(--space-2); padding-left: var(--space-4); }
.swipe-accordion-body code {
  font-family: var(--font-structural);
  font-size: 13px;
  background: var(--bg-muted);
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-sm);
}
.swipe-accordion-body pre {
  background: var(--bg-muted);
  padding: 0.75rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 0 0 var(--space-2);
}
.swipe-accordion-body pre code {
  background: none;
  padding: 0;
}
.swipe-accordion-body img {
  max-width: 100%;
  height: auto;
}

/* Comments */
.swipe-comments-loading {
  font-family: var(--font-content);
  color: var(--fg-dim);
  font-style: italic;
  padding: var(--space-2) 0;
}

.swipe-comment {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--fg-vdim);
}

.swipe-comment:last-child {
  border-bottom: none;
}

.swipe-comment-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 0.3rem;
  font-family: var(--font-structural);
}

.swipe-comment-body {
  font-family: var(--font-content);
  font-size: 14px;
  line-height: 1.5;
}

/* Counter - dot indicators */
.swipe-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-structural);
  font-size: 11px;
  color: var(--fg-dim);
}

.swipe-counter-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.swipe-counter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, transform 0.2s;
}

.swipe-counter-dot.active {
  background: var(--fg-dim);
  transform: scale(1.3);
}

/* Linear Link */
.swipe-card-link {
  display: block;
  margin-top: var(--space-2);
  padding-top: 0.4rem;
  border-top: 1px solid var(--fg-vdim);
  font-size: 11px;
  font-family: var(--font-content);
}

.swipe-card-link a {
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.swipe-card-link a:hover {
  color: var(--blue);
}

/* ==========================================================================
   Prompt Section (rendered inside the fourth card accordion)
   ========================================================================== */

.swipe-accordion-body .prompt-section {
  font-family: var(--font-structural);
}

/* Cache hint appended to the closed accordion header */
.swipe-prompts-cache-hint {
  color: var(--fg-dim);
  font-size: 11px;
  margin-left: var(--space-1);
}

/* Prompt Buttons - compact centered row */
.swipe-prompt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: var(--space-2) 0 var(--space-1);
  justify-content: center;
}

.swipe-prompt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
  color: var(--fg-dim);
  font-family: var(--font-content);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}

.swipe-prompt-btn:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
  color: var(--fg);
}

.swipe-prompt-btn:active {
  background: var(--bg-muted);
}

.swipe-prompt-btn.active {
  border-color: var(--blue);
  background: #eff4ff;
  color: var(--blue);
}

.swipe-prompt-btn.loading {
  opacity: 0.6;
  pointer-events: none;
}

.swipe-prompt-btn.ai-btn {
  border-color: #e8d48a;
  color: #8a6d00;
  background: linear-gradient(135deg, #fffdf5, #fff8e1);
}

.swipe-prompt-btn.ai-btn:hover {
  background: linear-gradient(135deg, #fffbeb, #fff3cd);
  border-color: var(--yellow);
}

.swipe-prompt-btn.ai-btn.active {
  border-color: var(--yellow);
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  color: #6b5600;
}

.swipe-prompt-btn-more {
  font-size: 11px;
  color: var(--fg-dim);
  border-style: dashed;
}

.swipe-prompt-btn.custom-prompt-btn {
  border-style: dashed;
}

/* More prompts (hidden by default) */
.swipe-more-prompts {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-2);
  justify-content: center;
}

.swipe-more-prompts.visible {
  display: flex;
}

/* Prompt Section Header (fresh / generating / error) */
.prompt-section .swipe-prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.4rem 0;
  font-family: var(--font-content);
  font-size: 11px;
}

.prompt-section[data-phase="idle"] .swipe-prompt-header {
  border-bottom: 1px solid var(--fg-vdim);
}

.prompt-section[data-phase="fresh"] .swipe-prompt-header,
.prompt-section[data-phase="generating"] .swipe-prompt-header,
.prompt-section[data-phase="error"] .swipe-prompt-header {
  border-bottom: 1px solid var(--fg-vdim);
  margin-bottom: 0.4rem;
}

.swipe-prompt-name {
  color: var(--fg-dim);
  font-weight: 600;
}

.swipe-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-left: auto;
}

.swipe-prompt-actions button,
.prompt-section .swipe-prompt-change {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg-dim);
  font-family: var(--font-content);
  font-size: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.swipe-prompt-actions button:hover,
.prompt-section .swipe-prompt-change:hover {
  background: var(--bg-muted);
}

.swipe-prompt-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Inline dispatch options panel revealed by the "Dispatch ▾" trigger. Hidden
   via the global .hidden class; when shown it lays its targets out in a row. */
.swipe-prompt-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

/* LIN-525 #1: driven by the body attribute (see style.css), not a per-button class. */
body[data-proxy-active="true"] .prompt-section .prompt-proxy-toggle {
  background: #eff4ff;
  color: var(--blue);
  border-color: var(--blue);
}

.swipe-prompt-text {
  padding: var(--space-2) 0 0;
  font-size: 13px;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
  color: var(--fg);
}

/* Warning banner: surfaces a truncated/incomplete generation to the user */
.swipe-prompt-warning {
  margin-top: var(--space-2);
  padding: 0.4rem 0.6rem;
  font-size: 12px;
  line-height: 1.4;
  color: #8a5a00;
  background: #fff6e0;
  border: 1px solid #f0d28a;
  border-radius: 4px;
}

/* Streaming fade-in for the section */
@keyframes promptFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.prompt-section.streaming {
  animation: promptFadeIn 0.3s ease-out both;
}

/* Per-element fade-in during streaming — new blocks materialise smoothly */
@keyframes streamIn {
  from { opacity: 0; filter: blur(2px); transform: translateY(4px); }
  to   { opacity: 1; filter: blur(0);   transform: translateY(0); }
}

.swipe-prompt-text .stream-in {
  animation: streamIn 0.35s ease-out both;
}

/* Subtle indicator on the element currently being written to */
.prompt-section.streaming .swipe-prompt-text .stream-cursor {
  border-left: 2px solid rgba(0,0,0,0.12);
  padding-left: var(--space-2);
  transition: border-color 0.3s;
}

/* Bottom gradient mask during streaming — text appears to materialise */
.prompt-section.streaming .swipe-prompt-text {
  mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
}

.swipe-prompt-text p { margin: 0 0 var(--space-2); }
.swipe-prompt-text ul,
.swipe-prompt-text ol { margin: 0 0 var(--space-2); padding-left: var(--space-4); }
.swipe-prompt-text code {
  font-family: var(--font-structural);
  font-size: 12px;
  background: var(--bg-muted);
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-sm);
}
.swipe-prompt-text pre {
  background: var(--bg-muted);
  padding: 0.75rem;
  border-radius: 4px;
  overflow-x: auto;
}
.swipe-prompt-text pre code {
  background: none;
  padding: 0;
}

/* Copy / download feedback */
.swipe-prompt-copy.copied,
.swipe-prompt-download.copied {
  color: var(--green);
  border-color: var(--green);
}


/* Reasoning toggle (inside prompt section) */
.prompt-section .swipe-reasoning-toggle {
  padding: 0.4rem 0;
  font-size: 11px;
  color: var(--fg-dim);
  cursor: pointer;
  font-family: var(--font-content);
  border-bottom: 1px solid var(--fg-vdim);
  user-select: none;
}
.prompt-section .swipe-reasoning-toggle:hover {
  color: var(--fg);
}

/* Reasoning content (collapsible) */
.prompt-section .swipe-reasoning-content {
  padding: 0.4rem 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--fg-vdim);
  max-height: 300px;
  overflow-y: auto;
}
.swipe-reasoning-content.hidden { display: none; }
.swipe-reasoning-toggle.hidden { display: none; }
.swipe-reasoning-content p { margin: 0 0 0.4rem; }
.swipe-reasoning-content ul,
.swipe-reasoning-content ol { margin: 0 0 0.4rem; padding-left: var(--space-4); }
.swipe-reasoning-content code {
  font-family: var(--font-structural);
  font-size: 11px;
  background: var(--bg-muted);
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Responsive - Desktop
   ========================================================================== */

@media (min-width: 641px) {
  .swipe-page {
    padding: var(--space-3) var(--space-5) 3rem;
  }

  .swipe-card-inner {
    padding: 1.25rem var(--space-4) var(--space-4);
  }

  .swipe-card-title {
    font-size: 22px;
  }
}

/* Wide desktop — intentional two-pane composition (LIN-1224).
   The mobile form is a single ~520px column; on a 1280px canvas that left the
   card floating in a void with vast dead margins. At >=900px the page becomes a
   framed grid: a left control rail (title + filter + prev/next) beside the card
   stage, centred in a bounded panel. Nothing here touches the mobile layout —
   below 900px the page stays the original single centred column. */
@media (min-width: 900px) {
  .swipe-page {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 560px);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "rail-header stage"
      "rail-filter stage"
      "rail-nav    stage"
      "rail-fill   stage";
    column-gap: var(--space-5);
    align-items: start;
    justify-content: center;
    max-width: 960px;
    padding: var(--space-4) var(--space-5) 3rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-top: var(--space-4);
  }

  /* Card stage sits on the framed panel; the raised card + its shadow now read
     against a surface instead of empty page. */
  .theme-dark .swipe-page {
    background: var(--bg);
  }

  .swipe-header { grid-area: rail-header; }
  .swipe-filter-bar { grid-area: rail-filter; }
  .swipe-nav-row { grid-area: rail-nav; }
  .swipe-card-area { grid-area: stage; }

  /* Rail header: left-aligned in the rail rather than page-centred. */
  .swipe-header {
    text-align: left;
    margin-bottom: var(--space-3);
  }

  .swipe-header h1 {
    font-size: 26px;
  }

  .swipe-filter-bar {
    margin-bottom: 0;
  }

  /* Navigation cluster: a labelled control block at the foot of the rail,
     separated from the filter by a hairline so it reads as its own affordance. */
  .swipe-nav-row {
    justify-content: flex-start;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
  }
}

/* ==========================================================================
   Responsive - Small Phones
   ========================================================================== */

@media (max-width: 400px) {
  .swipe-page {
    padding: var(--space-2) 0.75rem var(--space-4);
  }

  .swipe-card-inner {
    padding: 0.75rem var(--space-3) var(--space-3);
  }

  .swipe-card-title {
    font-size: 18px;
  }

  .swipe-prompt-btn {
    padding: 0.4rem 0.6rem;
    font-size: 11px;
    min-height: 32px;
  }

  .swipe-arrow {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

/* =============================================================================
   Dispatched Sessions accordion
   ============================================================================= */

.swipe-sessions-count {
  color: var(--fg-dim);
  font-size: 0.9em;
}

.sessions-section {
  font-family: var(--font-structural);
  font-size: var(--font-size-sm);
}

.sessions-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-bottom: 0.4rem;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid var(--fg-vdim);
}

.sessions-status-label {
  font-weight: 500;
  color: var(--fg);
}

.sessions-count-meta {
  color: var(--fg-dim);
}

.sessions-refresh {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--fg-dim);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

.sessions-refresh:hover {
  color: var(--fg);
}

.sessions-empty {
  color: var(--fg-dim);
  padding: var(--space-2) 0;
}

.sessions-error {
  color: var(--red);
}

.session-entry {
  border-bottom: 1px solid var(--fg-vdim);
  padding: var(--space-2) 0;
}

.session-entry:last-child {
  border-bottom: none;
}

.session-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.session-state {
  flex-shrink: 0;
}

.session-state.state-queued { color: var(--fg-dim); }
.session-state.state-running { color: var(--green); }
.session-state.state-waiting { color: var(--yellow); }
.session-state.state-complete { color: var(--green); }
.session-state.state-error { color: var(--red); }

.session-stage {
  font-weight: 500;
  color: var(--fg);
}

.session-prompt-name {
  color: var(--fg-dim);
}

.session-iteration {
  color: var(--fg-dim);
}

.session-time {
  color: var(--fg-dim);
  margin-left: auto;
}

.session-summary {
  font-family: var(--font-content);
  font-size: 0.9em;
  color: var(--fg);
  padding: 0.3rem 0 0 1.25rem;
  line-height: 1.4;
}

.session-feedback {
  padding: var(--space-1) 0 0 1.25rem;
}

.session-feedback-entry {
  color: var(--fg-dim);
  padding: 0.1rem 0;
}

.session-feedback-time {
  color: var(--fg-dim);
  opacity: 0.7;
}
