/* ============================================================
   FEEDS — Onboarding & Accounts (Feature Brief 1)
   Kept in its own stylesheet rather than appended to styles.css: it is a
   self-contained surface, and styles.css is large and shared.

   The step transition is deliberately short (140ms out, 180ms in) — long
   enough to read as movement between questions, short enough that a ten-step
   flow never feels like waiting for animation.
   ============================================================ */

.ob-overlay, .acc-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(12, 13, 15, .72); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
  opacity: 0; transition: opacity .2s ease;
}
.ob-overlay.open, .acc-overlay.open { opacity: 1; }

.ob-panel, .acc-panel {
  width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--charcoal, #1c1d20); color: var(--offwhite, #e9e9ea);
  border: 1px solid var(--charcoal-line, #303136); border-radius: 16px;
  padding: 22px 24px 20px;
  transform: translateY(8px) scale(.99);
  transition: transform .2s cubic-bezier(.22, 1, .36, 1);
}
.ob-overlay.open .ob-panel, .acc-overlay.open .acc-panel { transform: none; }

/* ---- onboarding chrome ---- */
.ob-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ob-meta { display: flex; align-items: baseline; gap: 10px; }
.ob-stage {
  font-weight: 700; font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--yellow, #F3C11B);
}
.ob-count { font-size: 12.5px; color: var(--muted, #9a9ba1); }
.ob-close {
  background: none; border: none; color: var(--muted, #9a9ba1);
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.ob-close:hover { color: var(--offwhite, #e9e9ea); }

.ob-progress {
  height: 3px; background: rgba(255, 255, 255, .08); border-radius: 2px;
  margin: 14px 0 20px; overflow: hidden;
}
.ob-progress-bar {
  height: 100%; width: 0; background: var(--yellow, #F3C11B);
  transition: width .35s cubic-bezier(.22, 1, .36, 1);
}

.ob-body {
  min-height: 190px; opacity: 0; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}
.ob-body.in { opacity: 1; transform: none; }
.ob-title { font-size: 22px; line-height: 1.25; margin: 0 0 6px; font-weight: 700; }
.ob-sub { margin: 0 0 16px; color: var(--muted, #9a9ba1); font-size: 14px; }
.ob-field { display: grid; gap: 10px; }

.ob-input {
  width: 100%; padding: 12px 14px; font-family: inherit; font-size: 15px;
  background: rgba(255, 255, 255, .04); color: var(--offwhite, #e9e9ea);
  border: 1px solid var(--charcoal-line, #303136); border-radius: 10px;
}
.ob-input:focus {
  outline: none; border-color: var(--yellow, #F3C11B);
  background: rgba(255, 255, 255, .06);
}
textarea.ob-input { resize: vertical; }

.ob-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-choice {
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 14px;
  background: rgba(255, 255, 255, .04); color: var(--offwhite, #e9e9ea);
  border: 1px solid var(--charcoal-line, #303136);
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.ob-choice:hover { border-color: var(--muted, #9a9ba1); }
.ob-choice.on {
  background: var(--yellow, #F3C11B); border-color: var(--yellow, #F3C11B);
  color: #1c1d20; font-weight: 600;
}

.ob-src-results { display: grid; gap: 2px; }
.ob-src-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 10px 12px; cursor: pointer;
  font-family: inherit; font-size: 14px;
  background: rgba(255, 255, 255, .03); color: var(--offwhite, #e9e9ea);
  border: 1px solid transparent; border-radius: 8px;
}
.ob-src-row:hover { border-color: var(--yellow, #F3C11B); }
.ob-src-type {
  font-size: 11.5px; color: var(--muted, #9a9ba1);
  text-transform: uppercase; letter-spacing: .05em;
}
.ob-src-chosen { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.ob-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px; font-size: 13px;
  background: rgba(243, 193, 27, .14); border: 1px solid rgba(243, 193, 27, .4);
}
.ob-chip button {
  background: none; border: none; color: inherit; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0;
}
.ob-hint { font-size: 13px; color: var(--muted, #9a9ba1); }

.ob-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 22px; gap: 12px;
}
.ob-foot-right { display: flex; align-items: center; gap: 10px; }
.ob-back, .ob-skip {
  background: none; border: none; color: var(--muted, #9a9ba1);
  cursor: pointer; font-family: inherit; font-size: 14px; padding: 8px 4px;
}
.ob-back:hover, .ob-skip:hover { color: var(--offwhite, #e9e9ea); }
.ob-next {
  background: var(--yellow, #F3C11B); color: #1c1d20; border: none;
  border-radius: 999px; padding: 11px 26px;
  font-family: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.ob-next:hover { filter: brightness(1.06); }

/* ---- account panel ---- */
.acc-panel { position: relative; }
/* (Round 19 item 4) The X is the panel's one navigation control — back a level,
   or close at the top — so it is given a real target instead of a bare glyph:
   a circular hit area that reads as a button, and a red hover that says the
   action is destructive of the current view. */
.acc-x {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 50%;
  color: var(--muted, #9a9ba1); font-size: 20px; line-height: 1; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.acc-x:hover {
  background: #d64545;
  border-color: #d64545;
  color: #fff;
}
.acc-x:focus-visible { outline: 2px solid var(--yellow, #F3C11B); outline-offset: 2px; }

/* (Round 19 item 3) Inline retry inside an empty/error state. */
.acc-linkish {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--yellow, #F3C11B); font: inherit; text-decoration: underline;
}
/* (Round 16 item 1) The wordmark inside the modal is the HEADER's `.logo`
   component — same font, same colour, same span rule. Only the size and
   centring are overridden here, because `.logo` is sized for a 58px masthead.
   Nothing about the brand itself is redefined, which is the point: the previous
   `.acc-brand` was a second definition that had already drifted. */
.acc-logo {
  font-size: 34px !important;
  text-align: center;
  justify-self: center;
  margin-bottom: 14px;
}
.acc-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 16px;
  background: rgba(255, 255, 255, .04); border-radius: 999px;
}
.acc-tab {
  flex: 1; padding: 9px; border: none; border-radius: 999px; background: none;
  color: var(--muted, #9a9ba1); font-family: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer;
}
.acc-tab.on { background: var(--yellow, #F3C11B); color: #1c1d20; }
.acc-lead {
  margin: 0 0 14px; color: var(--muted, #9a9ba1);
  font-size: 14px; text-align: center;
}
.acc-oauth {
  width: 100%; padding: 11px; border-radius: 10px; border: none;
  background: #fff; color: #14171a;
  font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.acc-or {
  display: flex; align-items: center; gap: 10px; margin: 14px 0;
  color: var(--muted, #9a9ba1); font-size: 12.5px;
}
.acc-or::before, .acc-or::after {
  content: ""; flex: 1; height: 1px; background: var(--charcoal-line, #303136);
}
.acc-input {
  width: 100%; padding: 12px 14px; margin-bottom: 9px;
  font-family: inherit; font-size: 15px;
  background: rgba(255, 255, 255, .04); color: var(--offwhite, #e9e9ea);
  border: 1px solid var(--charcoal-line, #303136); border-radius: 10px;
}
.acc-input:focus { outline: none; border-color: var(--yellow, #F3C11B); }
.acc-err { display: none; color: #ff8b8b; font-size: 13px; margin: 4px 0 8px; }
.acc-primary {
  width: 100%; padding: 12px; border: none; border-radius: 999px;
  background: var(--yellow, #F3C11B); color: #1c1d20;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.acc-primary:disabled { opacity: .6; cursor: default; }
.acc-fine {
  margin: 12px 0 0; font-size: 12.5px;
  color: var(--muted, #9a9ba1); text-align: center;
}
.acc-title { font-size: 20px; font-weight: 700; }
.acc-email { color: var(--muted, #9a9ba1); font-size: 13.5px; margin-bottom: 16px; }
.acc-resume { margin-bottom: 18px; }
.acc-complete {
  color: var(--yellow, #F3C11B); font-size: 13.5px;
  font-weight: 600; margin-bottom: 18px;
}
.acc-section {
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted, #9a9ba1); margin: 16px 0 6px;
}
.acc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--charcoal-line, #303136);
  font-size: 14px;
}
.acc-row-label { color: var(--muted, #9a9ba1); }
.acc-row-val { text-align: right; }
.acc-row-add {
  background: none; border: 1px solid var(--charcoal-line, #303136);
  border-radius: 999px; padding: 4px 12px; color: var(--yellow, #F3C11B);
  font-family: inherit; font-size: 12.5px; cursor: pointer;
}
.acc-row-add:hover { border-color: var(--yellow, #F3C11B); }
.acc-signout {
  width: 100%; margin-top: 20px; padding: 10px; background: none;
  border: 1px solid var(--charcoal-line, #303136); border-radius: 999px;
  color: var(--muted, #9a9ba1); font-family: inherit; font-size: 14px; cursor: pointer;
}
.acc-signout:hover { color: var(--offwhite, #e9e9ea); }
.icon-btn.signed-in { color: var(--yellow, #F3C11B); }

.acc-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 300;
  transform: translate(-50%, 12px);
  background: var(--charcoal, #1c1d20);
  border: 1px solid var(--charcoal-line, #303136);
  color: var(--offwhite, #e9e9ea);
  padding: 11px 18px; border-radius: 999px; font-size: 14px;
  opacity: 0; transition: opacity .22s ease, transform .22s ease;
}
.acc-toast.in { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .ob-title { font-size: 19px; }
  .ob-panel, .acc-panel { padding: 18px 16px 16px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .ob-body, .ob-progress-bar, .ob-panel, .acc-panel,
  .ob-overlay, .acc-overlay, .acc-toast { transition: none !important; }
}

/* ============================================================
   SUBSCRIPTIONS & NOTIFICATIONS (Feature Brief 2)
   ============================================================ */
.sub-btn {
  margin-left: auto; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  background: none; color: var(--muted, #9a9ba1);
  border: 1px solid var(--charcoal-line, #303136);
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.sub-btn:hover { color: var(--yellow, #F3C11B); border-color: var(--yellow, #F3C11B); }
.sub-btn.on {
  background: rgba(243, 193, 27, .16);
  border-color: rgba(243, 193, 27, .5); color: var(--yellow, #F3C11B);
}

/* (Round 16 item 6) Story-detail action bar. The old `.pin-btn` overlay on the
   card thumbnail is gone — it sat on top of the media-type badge. */
.sv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.sv-act {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  background: rgba(255, 255, 255, .04); color: var(--offwhite, #e9e9ea);
  border: 1px solid var(--charcoal-line, #303136);
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.sv-act:hover { border-color: var(--yellow, #F3C11B); color: var(--yellow, #F3C11B); }
.sv-act.on {
  background: rgba(243, 193, 27, .16);
  border-color: rgba(243, 193, 27, .5); color: var(--yellow, #F3C11B);
}
.sv-act svg { width: 15px; height: 15px; flex: none; }

#bellBtn { position: relative; }
.bell-badge {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px;
  padding: 0 4px; border-radius: 999px; background: var(--yellow, #F3C11B);
  color: #1c1d20; font-size: 10px; font-weight: 700; line-height: 15px; text-align: center;
}

.nt-panel {
  position: fixed; z-index: 210; width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 560px); display: flex; flex-direction: column;
  background: var(--charcoal, #1c1d20); border: 1px solid var(--charcoal-line, #303136);
  border-radius: 14px; overflow: hidden; box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.nt-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 15px; border-bottom: 1px solid var(--charcoal-line, #303136);
  font-weight: 700; font-size: 14.5px;
}
.nt-readall {
  background: none; border: none; color: var(--muted, #9a9ba1);
  font-family: inherit; font-size: 12.5px; cursor: pointer;
}
.nt-readall:hover { color: var(--yellow, #F3C11B); }
.nt-list { overflow-y: auto; flex: 1; }
.nt-row {
  display: block; padding: 12px 15px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--charcoal-line, #303136); cursor: pointer;
}
.nt-row:hover { background: rgba(255, 255, 255, .035); }
.nt-row.unread { border-left: 2px solid var(--yellow, #F3C11B); }
.nt-kind {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--yellow, #F3C11B); margin-bottom: 3px;
}
.nt-title { font-size: 14px; line-height: 1.35; }
.nt-body { font-size: 12.5px; color: var(--muted, #9a9ba1); margin-top: 3px; }
.nt-time { font-size: 11.5px; color: var(--muted, #9a9ba1); margin-top: 5px; }
.nt-empty {
  padding: 26px 18px; text-align: center;
  color: var(--muted, #9a9ba1); font-size: 13.5px; line-height: 1.5;
}
.nt-settings {
  width: 100%; padding: 11px; background: none; border: none;
  border-top: 1px solid var(--charcoal-line, #303136);
  color: var(--muted, #9a9ba1); font-family: inherit; font-size: 13px; cursor: pointer;
}
.nt-settings:hover { color: var(--offwhite, #e9e9ea); }

.nt-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--charcoal-line, #303136); cursor: pointer;
}
.nt-toggle-label { display: block; font-size: 14.5px; }
.nt-toggle-hint { display: block; font-size: 12.5px; color: var(--muted, #9a9ba1); margin-top: 2px; }
.nt-toggle input { width: 18px; height: 18px; accent-color: var(--yellow, #F3C11B); flex: none; }

.acc-cats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }

/* ---- (Round 16 items 3/4/5) library, settings sections, outlet picker ---- */
.acc-head-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.acc-head-row > div:first-child { flex: 1; }
.acc-title-inline { flex: 1; }
/* (Round 19, follow-up) The .acc-back chevron is gone — the X walks the stack,
   so a second control for the same action was removed. .acc-gear went with it:
   it shared this rule and has rendered nowhere since Round 17 moved Settings
   out of the library header and into the account menu. */

/* The title keeps right-hand room so it can never run under the X, which is
   absolutely positioned in the same corner (30px wide + 14px inset). */
.acc-title-inline { padding-right: 46px; }

.acc-empty {
  padding: 28px 8px; text-align: center; color: var(--muted, #9a9ba1);
  font-size: 13.5px; line-height: 1.6;
}
.acc-lib-row {
  display: block; padding: 12px 0; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--charcoal-line, #303136);
}
.acc-lib-row:hover .acc-lib-title { color: var(--yellow, #F3C11B); }
.acc-lib-cat {
  display: block; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--yellow, #F3C11B); margin-bottom: 3px;
}
.acc-lib-title { font-size: 14.5px; line-height: 1.35; }

.acc-menu-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 14px 0; cursor: pointer;
  background: none; border: none; border-bottom: 1px solid var(--charcoal-line, #303136);
  color: var(--offwhite, #e9e9ea); font-family: inherit; font-size: 15px; font-weight: 600;
}
.acc-menu-row:hover { color: var(--yellow, #F3C11B); }
.acc-menu-hint { font-size: 12.5px; font-weight: 400; color: var(--muted, #9a9ba1); text-align: right; }
.acc-row-btn {
  width: 100%; text-align: left; background: none; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--offwhite, #e9e9ea);
  border: none; border-bottom: 1px solid var(--charcoal-line, #303136);
}
.acc-row-btn:hover .acc-row-val, .acc-row-btn:hover .acc-row-add { color: var(--yellow, #F3C11B); }
.acc-hint { font-size: 12.5px; color: var(--muted, #9a9ba1); margin: 6px 0 2px; }

.op-search { margin-bottom: 10px; }
.op-results { display: grid; gap: 3px; }
.op-results:not(:empty) { margin-bottom: 14px; }
.op-suggest-label {
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted, #9a9ba1); margin: 10px 0 7px;
}
.op-list { display: grid; gap: 3px; max-height: 260px; overflow-y: auto; }
.op-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 11px; cursor: pointer; font-family: inherit; font-size: 14px;
  background: rgba(255, 255, 255, .03); color: var(--offwhite, #e9e9ea);
  border: 1px solid transparent; border-radius: 9px;
}
.op-row:hover { border-color: var(--muted, #9a9ba1); }
.op-row.on { background: rgba(243, 193, 27, .13); border-color: rgba(243, 193, 27, .45); }
.op-logo { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; flex: none; background: #333; }
.op-mono {
  width: 22px; height: 22px; border-radius: 4px; flex: none;
  display: grid; place-items: center; font-size: 9.5px; font-weight: 700;
  background: rgba(255, 255, 255, .1); color: var(--offwhite, #e9e9ea);
}
.op-name { flex: 1; }
.op-lean { font-size: 11px; color: var(--muted, #9a9ba1); }
.op-tick { width: 18px; text-align: center; color: var(--yellow, #F3C11B); font-weight: 700; }

/* ---- (Round 17 item 3) first name in the display face ----
   Only where the UI greets you in short form. Sized up slightly because Pirata
   One has a smaller apparent x-height than the UI face, so matching font-size
   would read as smaller, not different. */
.fancy-name {
  font-family: "Pirata One", Georgia, serif;
  font-size: 1.24em;
  line-height: 1;
  letter-spacing: .01em;
  color: var(--yellow, #F3C11B);
  /* (Round 19 item 2) "Hi Manuel" read as "HiManuel". The markup does contain a
     space, but Pirata One carries almost no left side bearing and is set larger
     here, so a single UI-font space collapses against the capital. The gap is
     restored in the display face's own em, which keeps it proportional wherever
     the greeting is used — the account menu and the onboarding greeting both. */
  margin-left: .2em;
}

/* ---- (Round 17 item 4) required fields + credential forms ---- */
.acc-req { color: var(--yellow, #F3C11B); margin-left: 3px; font-weight: 700; }
.acc-row-add.needed { color: #ff9f9f; border-color: rgba(255, 159, 159, .4); }
.ob-input-error {
  border-color: #ff8b8b !important;
  animation: ob-shake .32s ease;
}
@keyframes ob-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.ob-sub-error { color: #ff9f9f !important; }
.acc-cred { margin-top: 4px; }
.acc-cred-form {
  padding: 12px 0 4px;
  border-bottom: 1px solid var(--charcoal-line, #303136);
}
.acc-cred-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.acc-cred-go { width: auto; padding: 9px 18px; font-size: 14px; }
.acc-menu-lead { display: inline-flex; align-items: center; gap: 8px; }
.acc-menu-lead svg { width: 15px; height: 15px; }

@media (prefers-reduced-motion: reduce) {
  .ob-input-error { animation: none; }
}
.acc-notif-link {
  width: 100%; margin-top: 18px; padding: 10px; background: none;
  border: 1px solid var(--charcoal-line, #303136); border-radius: 999px;
  color: var(--offwhite, #e9e9ea); font-family: inherit; font-size: 14px; cursor: pointer;
}
.acc-notif-link:hover { border-color: var(--yellow, #F3C11B); }
