/* The scroll feed: one job per screen, snap scrolling, swipe to decide. */
.feed-body { overflow: hidden; background: var(--bg); }
.feed-top {
  position: fixed; inset: 0 0 auto 0; z-index: 4; height: 56px; padding: 0 14px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(var(--bg) 55%, transparent);
}
.feed-tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 99px; }
.feed-tabs button { border: 0; background: none; padding: 6px 14px; border-radius: 99px; font-weight: 500; letter-spacing: .02em; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.feed-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.icon-btn { width: 38px; height: 38px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink); font-size: 20px; line-height: 1; }

.feed {
  height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.feed::-webkit-scrollbar { display: none; }
.slide {
  height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; justify-content: center; padding: 64px 12px calc(12px + env(safe-area-inset-bottom));
}
.reel {
  position: relative; width: 100%; max-width: 460px; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden; touch-action: pan-y; user-select: none;
  transition: transform .25s ease, opacity .25s ease;
}
.reel-band { height: 92px; flex: none; position: relative; background: hsl(var(--h) 30% 90%); }
@media (prefers-color-scheme: dark) { .reel-band { background: hsl(var(--h) 16% 22%); } }
.reel-avatar {
  position: absolute; left: 20px; bottom: -26px; width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; font-weight: 600; font-size: 24px; color: #fff; border: 3px solid var(--surface); background: hsl(var(--h) 36% 34%);
}
.reel-match { position: absolute; right: 16px; top: 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 4px 11px; border-radius: 99px; font-weight: 600; font-size: 14px; }
.reel-body { flex: 1; overflow-y: auto; padding: 36px 20px 8px; display: grid; gap: 14px; align-content: start; }
.reel-company { font-size: 14px; color: var(--ink-3); }
.reel-company b { color: var(--ink-2); font-weight: 600; }
.reel h2 { margin: -6px 0 0; font-size: clamp(22px, 6vw, 28px); line-height: 1.15; letter-spacing: -.02em; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { background: var(--surface-2); border-radius: 10px; padding: 9px 11px; font-size: 13px; letter-spacing: .01em; }
.fact span { display: block; color: var(--ink-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 2px; }
.fact.warn { background: var(--warn-soft); color: var(--warn); }
.fact.good { color: var(--ink); font-weight: 500; }
.reel-summary { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.honesty { font-size: 13px; color: var(--ink-3); }
.honesty b { color: var(--ink-2); }

.reel-actions {
  flex: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  padding: 10px 12px 14px; border-top: 1px solid var(--line); background: var(--surface);
}
.act { border: 0; background: none; display: grid; justify-items: center; gap: 3px; padding: 6px 0; border-radius: 12px; cursor: pointer; color: var(--ink-2); font-size: 12px; font-weight: 500; letter-spacing: .02em; text-decoration: none; }
.act svg { width: 26px; height: 26px; }
.act:hover { background: var(--surface-2); }
.act.saved { color: var(--accent); }
.act.saved svg { fill: currentColor; }
.act.primary { color: var(--accent); }

.reel-share { position: absolute; left: 16px; top: 16px; width: 34px; height: 34px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
body.lite .reel-share { position: static; background: var(--surface-2); color: var(--ink); }

/* swipe feedback */
.stamp { position: absolute; top: 120px; padding: 6px 14px; border: 3px solid; border-radius: 10px; font-weight: 600; font-size: 26px; letter-spacing: .08em; opacity: 0; pointer-events: none; transform: rotate(-12deg); }
.stamp.save { left: 20px; color: var(--accent); border-color: var(--accent); }
.stamp.pass { right: 20px; color: var(--ink-3); border-color: var(--ink-3); transform: rotate(12deg); }
.heart-burst { position: absolute; left: 50%; top: 45%; width: 110px; height: 110px; margin: -55px 0 0 -55px; color: var(--accent); pointer-events: none; animation: burst .7s ease-out forwards; }
@keyframes burst { 0% { transform: scale(.3); opacity: 0; } 30% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }

/* special slides */
.reel.note { justify-content: center; align-items: center; text-align: center; padding: 32px; gap: 14px; }
.reel.note h2 { margin: 0; }
.reel.note p { color: var(--ink-2); margin: 0; max-width: 30ch; }

/* bottom sheets */
dialog.sheet {
  margin: auto auto 0; width: min(560px, 100vw); max-width: 100vw; max-height: 88dvh; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  background: var(--surface); color: var(--ink);
}
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 18px; } }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .45); }
.sheet-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 8px; }
.sheet-head h3 { margin: 0; font-size: 18px; }
.sheet-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.sheet-loading { display: flex; gap: 12px; align-items: center; padding: 28px 4px; color: var(--ink-2); }
.kit-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.kit-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.kit-text { font-size: 14.5px; color: var(--ink-2); }
.kit-text ul { margin: 0; padding-left: 18px; }
.kit-block p { font-size: 14.5px; color: var(--ink-2); margin: 6px 0; }

.feed-keys { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--ink-3); margin: 0; display: none; }
@media (min-width: 900px) and (hover: hover) { .feed-keys { display: block; } .slide { padding-bottom: 40px; } }
@media (prefers-reduced-motion: reduce) { .reel, .heart-burst { transition: none; animation: none; } }
.answer-list { display: grid; gap: 6px; margin-top: 6px; }
.answer { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; font-size: 14px; }
.answer span { color: var(--ink-3); }
.answer-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .answer-form { grid-template-columns: 1fr; } }
.miss-btn { border: 1px dashed var(--warn); background: var(--warn-soft); color: var(--warn); cursor: pointer; font: inherit; font-size: 12.5px; }
.ask-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; }
.act.apply { color: var(--accent); }
.stale { color: var(--warn); }
.progress-card { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.progress-card a { color: var(--warn); font-weight: 600; }
/* Lite mode: no gradients, avatars or web fonts; less to download and draw. */
body.lite { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
body.lite .reel-band { height: 12px; background: var(--surface-2) !important; }
body.lite .reel-avatar, body.lite .reel-summary { display: none; }
body.lite .reel-match { position: static; display: inline-block; margin: 0 0 4px; }
body.lite .reel-body { padding-top: 16px; }
body.lite .reel-band { height: auto; padding: 12px 16px 0; background: none !important; }
.reel.note .btn { width: min(280px, 100%); }

/* Top bar: view switch + icons. On narrow phones everything tightens so it fits one row. */
.feed-actions { display: flex; gap: 8px; align-items: center; }
.view-switch { border-radius: 99px; }
@media (max-width: 400px) {
  .feed-top { padding: 0 10px; }
  .feed-actions { gap: 6px; }
  .feed-tabs button { padding: 6px 10px; }
  .view-switch { padding: 0 10px; }
}

.sheet-head .icon-btn { flex: none; }
