/* ═══════════════════════════════════════════════════════════
   OPTION SELLERS SCHOOL — MEMBERS AREA
   Deep black, emerald and gold. Restraint over decoration:
   fine hairlines, generous space, confident type, quiet motion.
   ═══════════════════════════════════════════════════════════ */
:root {
  --black: #07080a; --bg: #0a0b0e; --bg-2: #0c0e11;
  --card: #111318; --card-2: #15181e; --raise: #1a1e25;

  --green: #188C6B; --green-2: #1fa37e; --green-3: #4fd1a5; --green-glow: rgba(31,163,126,.28);
  --gold: #F5A623; --gold-2: #F8BD55; --gold-3: #FFD98A; --gold-glow: rgba(245,166,35,.22);
  --violet: #8b7cf6;

  --ink: #fff; --ink-2: #c2c7cf; --ink-3: #9299a3; --muted: #6f757e;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.13);
  --hair: rgba(255,255,255,.055);

  --r: 16px; --r-lg: 22px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px -18px rgba(0,0,0,.9);
  --shadow-lift: 0 1px 0 rgba(255,255,255,.07) inset, 0 28px 60px -22px rgba(0,0,0,.95);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nav-w: 268px; --top-h: 64px;
  --ease: cubic-bezier(.22,.8,.26,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font-family: var(--font); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(31,163,126,.10), transparent 62%),
    radial-gradient(900px 520px at 100% 0%, rgba(245,166,35,.055), transparent 58%),
    var(--bg);
  background-attachment: fixed;
}
/* Fine grain keeps large dark areas from banding. */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--green-3); text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
::selection { background: rgba(31,163,126,.32); }
:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; border-radius: 6px; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes glowIn { from { opacity: 0; } to { opacity: 1; } }
.rise { animation: rise .55s var(--ease) both; }
.d1{animation-delay:.05s}.d2{animation-delay:.11s}.d3{animation-delay:.17s}
.d4{animation-delay:.23s}.d5{animation-delay:.29s}.d6{animation-delay:.35s}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Gate ──────────────────────────────────────────────── */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 2; }
.gate-card {
  width: 100%; max-width: 430px; padding: 40px 36px 32px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)), var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-lift);
  animation: rise .6s var(--ease) both;
}
.gate-mark {
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--green-3), var(--green));
  box-shadow: 0 10px 28px -10px var(--green-glow);
}
.gate-card h1 { font-size: 1.5rem; margin: 0 0 8px; letter-spacing: -.033em; font-weight: 800; }
.gate-card > p { color: var(--ink-3); font-size: .94rem; margin: 0 0 24px; }
.gate-card label {
  display: block; font-size: .7rem; color: var(--muted); font-weight: 800;
  text-transform: uppercase; letter-spacing: .13em; margin-bottom: 8px;
}
.gate-card input {
  width: 100%; background: rgba(0,0,0,.4); border: 1px solid var(--line-2); color: var(--ink);
  font: inherit; padding: 13px 15px; border-radius: 12px; margin-bottom: 16px; transition: border-color .2s;
}
.gate-card input::placeholder { color: #565c65; }
.gate-card input:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(31,163,126,.14); }
.gate-note { font-size: .78rem; color: var(--muted); margin: 16px 0 0; line-height: 1.6; }
.err { color: #f87171; font-size: .85rem; min-height: 19px; margin: -8px 0 8px; }

.btn {
  position: relative; background: linear-gradient(180deg, var(--green-2), var(--green));
  color: #fff; border: 0; font-weight: 700; padding: 13px 22px; border-radius: 12px; cursor: pointer;
  letter-spacing: -.005em; box-shadow: 0 10px 26px -12px var(--green-glow), 0 1px 0 rgba(255,255,255,.14) inset;
  transition: transform .18s var(--ease), box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.07); box-shadow: 0 16px 34px -12px var(--green-glow), 0 1px 0 rgba(255,255,255,.18) inset; }
.btn:active { transform: none; }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn-block { display: block; width: 100%; }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #241a06;
            box-shadow: 0 10px 26px -12px var(--gold-glow), 0 1px 0 rgba(255,255,255,.3) inset; }

/* ── Top bar ───────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 60; height: var(--top-h); display: flex; align-items: center;
  gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--hair);
  background: rgba(10,11,14,.78); backdrop-filter: saturate(160%) blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 800;
         font-size: .97rem; letter-spacing: -.02em; }
.brand i {
  width: 28px; height: 28px; border-radius: 9px; display: block; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--green-3), var(--green));
  box-shadow: 0 6px 18px -7px var(--green-glow);
}
.top .spacer { margin-left: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 15px;
  font-size: .79rem; font-weight: 700; color: var(--ink-2);
  background: rgba(255,255,255,.045); border: 1px solid var(--line);
}
.pill b { color: var(--gold-2); font-weight: 800; }
.pill.tier { color: var(--gold-3); border-color: rgba(245,166,35,.28);
             background: linear-gradient(180deg, rgba(245,166,35,.15), rgba(245,166,35,.05)); }
.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink-3);
         padding: 8px 14px; border-radius: 10px; font-size: .82rem; font-weight: 600; cursor: pointer;
         transition: color .18s, background .18s, border-color .18s; }
.ghost:hover { color: var(--ink); background: rgba(255,255,255,.06); border-color: var(--line-2); }
.burger { display: none; background: none; border: 0; color: var(--ink); font-size: 1.25rem; cursor: pointer; }

.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; align-items: start; position: relative; z-index: 2; }

/* ── Sidebar ───────────────────────────────────────────── */
.nav {
  position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto;
  padding: 22px 14px 48px; border-right: 1px solid var(--hair);
  background: linear-gradient(180deg, rgba(255,255,255,.017), transparent 220px);
  scrollbar-width: thin;
}
.nav::-webkit-scrollbar { width: 7px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.09); border-radius: 99px; }
.nav h6 { font-size: .655rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted);
          margin: 22px 12px 8px; font-weight: 800; }
.nav h6:first-child { margin-top: 0; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 11px; color: var(--ink-3); font-size: .895rem; font-weight: 600;
  transition: color .16s, background .16s;
}
.nav a:hover { background: rgba(255,255,255,.045); color: var(--ink); }
.nav a.on {
  color: var(--green-3); font-weight: 700;
  background: linear-gradient(90deg, rgba(31,163,126,.18), rgba(31,163,126,.04));
}
.nav a.on::before {
  content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--green-3);
  box-shadow: 0 0 14px var(--green-glow);
}
.nav a .ic { width: 19px; text-align: center; font-size: .92rem; opacity: .85; }
.nav a .tag { margin-left: auto; font-size: .63rem; font-weight: 800; letter-spacing: .06em;
              color: var(--gold-3); background: rgba(245,166,35,.13); border-radius: 999px; padding: 3px 8px; }

/* ── Main ──────────────────────────────────────────────── */
.main { min-height: calc(100vh - var(--top-h)); padding: 42px 46px 110px; max-width: 1140px;
        /* A grid item defaults to min-width:auto, so one wide child anywhere
           stretches the whole track and scrolls the page sideways. */
        min-width: 0; }
.page-head { margin-bottom: 30px; animation: rise .5s var(--ease) both; }
.eyebrow { font-size: .7rem; text-transform: uppercase; letter-spacing: .17em; color: var(--green-3);
           font-weight: 800; margin: 0 0 10px; }
.page-head h1 { font-size: 2.25rem; margin: 0 0 8px; letter-spacing: -.04em; font-weight: 800; line-height: 1.08; }
.page-head p { color: var(--ink-3); margin: 0; font-size: 1.02rem; max-width: 62ch; }
h2.sec { font-size: .7rem; text-transform: uppercase; letter-spacing: .17em; color: var(--muted);
         font-weight: 800; margin: 46px 0 16px; display: flex; align-items: center; gap: 14px; }
h2.sec::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

.card { background: linear-gradient(180deg, rgba(255,255,255,.028), transparent 60%), var(--card);
        border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 40px 42px;
  border: 1px solid var(--line); box-shadow: var(--shadow-lift);
  background:
    radial-gradient(760px 320px at 4% -30%, rgba(31,163,126,.26), transparent 66%),
    radial-gradient(520px 280px at 100% 120%, rgba(245,166,35,.11), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 50%), var(--card);
  animation: rise .6s var(--ease) both;
}
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79,209,165,.6), rgba(245,166,35,.35), transparent);
}
.hero h2 { margin: 0 0 10px; font-size: 2rem; letter-spacing: -.04em; font-weight: 800; line-height: 1.1; }
.hero h2 em { font-style: normal; background: linear-gradient(100deg, var(--green-3), var(--gold-2));
              -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero > p { color: var(--ink-2); margin: 0 0 24px; max-width: 56ch; font-size: 1.02rem; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 30px; }
.stat { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line);
        background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.012)); }
.stat b { display: block; font-size: 1.65rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.stat span { font-size: .745rem; color: var(--muted); text-transform: uppercase;
             letter-spacing: .1em; font-weight: 700; }
/* The third tile is a link, not a number, so it needs words-sized type. */
.stat-cta { display: block; text-decoration: none; color: inherit;
            transition: border-color .2s var(--ease), transform .18s var(--ease); }
.stat-cta b { font-size: 1.12rem; letter-spacing: -.02em; color: var(--green-2); }
.stat-cta b::after { content: " \2192"; }
.stat-cta:hover { border-color: var(--green-2); transform: translateY(-2px); }

/* ── Course cards ──────────────────────────────────────── */
.course {
  position: relative; display: block; color: inherit; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 55%), var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s;
  animation: rise .5s var(--ease) both;
}
.course:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow-lift); }
.course .band { height: 3px; background: linear-gradient(90deg, var(--green), var(--green-3), var(--green)); }
.course.gold .band { background: linear-gradient(90deg, var(--gold), var(--gold-3), var(--gold)); }
.course.violet .band { background: linear-gradient(90deg, #6d5fd4, var(--violet), #6d5fd4); }
.course .in { padding: 24px 24px 22px; display: flex; gap: 18px; align-items: flex-start; }
.course .txt { min-width: 0; flex: 1; }
.course h3 { margin: 0 0 7px; font-size: 1.1rem; letter-spacing: -.024em; font-weight: 800; line-height: 1.25; }
.course p { margin: 0 0 16px; color: var(--ink-3); font-size: .875rem; line-height: 1.55; }
.meta { display: flex; gap: 8px; font-size: .72rem; color: var(--muted); font-weight: 700;
        flex-wrap: wrap; text-transform: uppercase; letter-spacing: .07em; }
.meta span { background: rgba(255,255,255,.045); border-radius: 999px; padding: 4px 10px; }
.meta span.hl { color: var(--green-3); background: rgba(31,163,126,.13); }

/* Progress ring */
.ring { --p: 0; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
        background: conic-gradient(var(--green-3) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); position: relative; }
.ring::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--card); }
.ring b { position: relative; z-index: 1; font-size: .72rem; font-weight: 800; letter-spacing: -.02em; }
.course.gold .ring { background: conic-gradient(var(--gold-2) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); }
.course.violet .ring { background: conic-gradient(var(--violet) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); }

.bar { height: 5px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; margin-top: 14px; }
.bar i { display: block; height: 100%; border-radius: 999px;
         background: linear-gradient(90deg, var(--green), var(--green-3));
         box-shadow: 0 0 14px var(--green-glow); transition: width .7s var(--ease); }

/* ── Chapters ──────────────────────────────────────────── */
.chapter { margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
           background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 60%), var(--card);
           box-shadow: var(--shadow); animation: rise .45s var(--ease) both; }
.chapter > button { width: 100%; display: flex; align-items: center; gap: 16px; padding: 18px 20px;
                    background: none; border: 0; color: inherit; cursor: pointer; text-align: left; }
.chapter > button:hover { background: rgba(255,255,255,.028); }
.chapter .num { flex: 0 0 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
                font-weight: 800; font-size: .84rem; color: var(--green-3);
                background: linear-gradient(180deg, rgba(31,163,126,.26), rgba(31,163,126,.1));
                border: 1px solid rgba(31,163,126,.22); }
.chapter.all-done .num { background: linear-gradient(180deg, var(--green-2), var(--green)); color: #fff;
                         border-color: transparent; }
.chapter .ttl { font-weight: 700; font-size: 1rem; letter-spacing: -.018em; }
.chapter .sub { font-size: .755rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.chapter .chev { margin-left: auto; color: var(--muted); transition: transform .26s var(--ease); font-size: 1.1rem; }
.chapter.open .chev { transform: rotate(90deg); }
.lessons { list-style: none; margin: 0; padding: 0 12px 12px; display: none; }
.chapter.open .lessons { display: block; }
.lessons button { width: 100%; display: flex; align-items: center; gap: 14px; padding: 11px 14px;
                  background: none; border: 0; color: var(--ink-3); cursor: pointer; text-align: left;
                  border-radius: 10px; font-size: .9rem; transition: background .15s, color .15s; }
.lessons button:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.lessons button.done { color: var(--green-3); }
.tick { flex: 0 0 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2);
        display: grid; place-items: center; font-size: .6rem; transition: background .2s, border-color .2s; }
.lessons button.done .tick { background: linear-gradient(180deg, var(--green-2), var(--green));
                             border-color: transparent; color: #fff; box-shadow: 0 0 12px var(--green-glow); }
.lessons .dur { margin-left: auto; font-size: .73rem; color: var(--muted); font-weight: 600; }

/* ── Lesson ────────────────────────────────────────────── */
.video { aspect-ratio: 16/9; border-radius: var(--r-lg); display: grid; place-items: center; text-align: center;
         padding: 28px; color: var(--muted); font-size: .9rem; border: 1px solid var(--line);
         background: radial-gradient(500px 240px at 50% 40%, rgba(31,163,126,.09), transparent 70%), #0a0c0f;
         box-shadow: var(--shadow-lift); animation: rise .5s var(--ease) both; }
.video iframe { width: 100%; height: 100%; border: 0; border-radius: var(--r-lg); }
/* The 28px padding frames the "no video yet" message. With a real player in
   there it just steals a quarter of a phone screen, so drop it. */
.video.has-vid { padding: 0; }
/* An embed sits inside a post, so it needs its own breathing room. */
.video.embed { margin: 14px 0 4px; }
.lesson-nav { display: flex; gap: 11px; margin-top: 24px; flex-wrap: wrap; align-items: center; }

/* ── Feed ──────────────────────────────────────────────── */
.post { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 14px;
        background: linear-gradient(180deg, rgba(255,255,255,.028), transparent 55%), var(--card);
        box-shadow: var(--shadow); animation: rise .45s var(--ease) both;
        transition: border-color .25s, transform .25s var(--ease); }
.post:hover { border-color: var(--line-2); transform: translateY(-2px); }
.post.pin { border-color: rgba(245,166,35,.3);
            background: radial-gradient(500px 200px at 0% 0%, rgba(245,166,35,.1), transparent 62%), var(--card); }
.who { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
      font-size: .8rem; color: #fff; flex: 0 0 auto; letter-spacing: -.02em;
      background: linear-gradient(135deg, var(--green-3), var(--green));
      box-shadow: 0 6px 16px -7px var(--green-glow); }
.who b { font-size: .93rem; letter-spacing: -.015em; }
.who span { font-size: .775rem; color: var(--muted); }
.post h3 { margin: 0 0 10px; font-size: 1.16rem; letter-spacing: -.028em; font-weight: 800; line-height: 1.3; }
.post .body { color: var(--ink-2); font-size: .945rem; white-space: pre-line; line-height: 1.65; }
.post .foot { display: flex; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair);
              font-size: .77rem; color: var(--muted); font-weight: 700; letter-spacing: .03em; }
.badge-pin { font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
             color: var(--gold-3); background: rgba(245,166,35,.15); border: 1px solid rgba(245,166,35,.25);
             border-radius: 999px; padding: 4px 11px; margin-left: auto; }
.answer { margin-top: 16px; padding: 16px 18px; border-radius: 0 14px 14px 0;
          border-left: 2px solid var(--green-2);
          background: linear-gradient(90deg, rgba(31,163,126,.12), rgba(31,163,126,.02)); }
.answer b { color: var(--green-3); font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; }
.answer p { margin: 7px 0 0; color: var(--ink-2); font-size: .92rem; line-height: 1.6; }
.vid-ph { margin-top: 14px; aspect-ratio: 16/9; max-width: 440px; border-radius: 14px; border: 1px solid var(--line);
          background: radial-gradient(300px 150px at 50% 50%, rgba(31,163,126,.1), transparent 70%), #0a0c0f;
          display: grid; place-items: center; color: var(--muted); font-size: .82rem; }

/* ── Resources ─────────────────────────────────────────── */
.res { border-top: 1px solid var(--hair); padding: 18px 2px; transition: padding-left .22s var(--ease); }
.res:last-child { border-bottom: 1px solid var(--hair); }
.res:hover { padding-left: 10px; }
.res a { font-weight: 800; font-size: 1.03rem; letter-spacing: -.02em; }
.res a:hover { text-decoration: underline; text-underline-offset: 3px; }
.res p { margin: 4px 0 0; color: var(--ink-3); font-size: .9rem; }

.note { border-radius: var(--r); padding: 17px 19px; font-size: .88rem; line-height: 1.6; color: #f2d7a6;
        border: 1px solid rgba(245,166,35,.24);
        background: linear-gradient(180deg, rgba(245,166,35,.09), rgba(245,166,35,.025)); }
.note b { color: var(--gold-2); }
.empty { color: var(--muted); font-size: .9rem; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .burger { display: block; }
  .nav { position: fixed; top: var(--top-h); left: 0; bottom: 0; width: 280px; z-index: 70;
         background: var(--bg-2); transform: translateX(-100%); transition: transform .26s var(--ease);
         box-shadow: 0 0 60px rgba(0,0,0,.7); }
  .nav.open { transform: none; }
  .main { padding: 26px 18px 90px; }
  .hero { padding: 28px 22px; }
  .hero h2 { font-size: 1.55rem; }
  .page-head h1 { font-size: 1.7rem; }
  .course .in { padding: 20px; }
  .post { padding: 20px; }
  .pill:not(.tier) { display: none; }
}

/* ── Brand logo ────────────────────────────────────────── */
/* The site logo is black artwork on white, so it is inverted for dark UI. */
.brand img { width: 30px; height: 30px; flex: 0 0 auto; filter: invert(1) brightness(1.06); }
.brand span { letter-spacing: -.02em; }
img.gate-mark { width: 58px; height: 58px; display: block; margin-bottom: 18px; padding: 0;
                background: none; box-shadow: none; border-radius: 0;
                filter: invert(1) brightness(1.06) drop-shadow(0 8px 22px rgba(79,209,165,.22)); }

/* ── Composer ──────────────────────────────────────────── */
.composer { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 22px;
            background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 60%), var(--card);
            box-shadow: var(--shadow); animation: rise .45s var(--ease) both; }
.composer textarea, .reply-box textarea {
  width: 100%; resize: vertical; background: rgba(0,0,0,.35); color: var(--ink); font: inherit;
  border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 15px; line-height: 1.55;
  transition: border-color .2s, box-shadow .2s;
}
.composer textarea::placeholder, .reply-box textarea::placeholder { color: #575d66; }
.composer textarea:focus, .reply-box textarea:focus {
  outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(31,163,126,.13);
}
.composer-foot { display: flex; align-items: center; gap: 14px; margin-top: 13px; }
.composer-foot .err { margin: 0; flex: 1; }
.composer-foot .btn { margin-left: auto; padding: 10px 24px; }

/* ── Replies ───────────────────────────────────────────── */
.replies { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair);
           display: flex; flex-direction: column; gap: 16px; }
.reply { display: flex; gap: 12px; }
.reply .av { width: 30px; height: 30px; font-size: .68rem; }
.reply > div { flex: 1; min-width: 0; position: relative; }
.reply b { font-size: .87rem; letter-spacing: -.012em; }
.reply .ago { font-size: .74rem; color: var(--muted); margin-left: 9px; }
.reply p { margin: 5px 0 0; color: var(--ink-2); font-size: .91rem; line-height: 1.6; white-space: pre-line; }

.staff { font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
         color: #06281e; background: linear-gradient(180deg, var(--green-3), var(--green-2));
         border-radius: 999px; padding: 3px 8px; margin-left: 9px; vertical-align: 2px; }

.reply-box { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px;
             padding-top: 14px; border-top: 1px solid var(--hair); }
.reply-box textarea { flex: 1; min-height: 42px; padding: 10px 14px; font-size: .9rem; }
.reply-box .ghost { flex: 0 0 auto; padding: 11px 18px; }

.del { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer;
       font-size: .85rem; line-height: 1; padding: 6px 8px; border-radius: 8px; transition: color .15s, background .15s; }
.del:hover { color: #f87171; background: rgba(248,113,113,.1); }
.reply .del { position: absolute; top: -2px; right: 0; }

/* ── Live chat ─────────────────────────────────────────── */
.chat { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg);
        overflow: hidden; box-shadow: var(--shadow-lift);
        background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 40%), var(--card);
        animation: rise .5s var(--ease) both; }
.chat-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 22px 22px 8px;
            display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; }
.chat-log::-webkit-scrollbar { width: 8px; }
.chat-log::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 99px; }
.chat-log .empty { margin: auto; }

.msg { display: flex; gap: 12px; animation: glowIn .3s var(--ease) both; }
.msg .av { width: 32px; height: 32px; font-size: .7rem; }
.msg.mine .av { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #241a06; }
.msg-in { flex: 1; min-width: 0; position: relative; }
.msg-top { display: flex; align-items: baseline; gap: 9px; }
.msg-top b { font-size: .87rem; letter-spacing: -.012em; }
.msg-top .ago { font-size: .72rem; color: var(--muted); }
.msg-in p { margin: 4px 0 0; color: var(--ink-2); font-size: .93rem; line-height: 1.55;
            white-space: pre-wrap; word-break: break-word; }
.msg .del { position: absolute; top: -4px; right: 0; opacity: 0; transition: opacity .15s; }
.msg:hover .del { opacity: 1; }

.chat-send { display: flex; gap: 11px; align-items: flex-end; padding: 15px 18px;
             border-top: 1px solid var(--hair); background: rgba(0,0,0,.22); }
.chat-send textarea { flex: 1; min-width: 0; resize: none; min-height: 44px; max-height: 140px; overflow-y: auto;
                      background: rgba(0,0,0,.4); color: var(--ink); font: inherit; font-size: .93rem;
                      border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 15px;
                      line-height: 1.5; transition: border-color .2s, box-shadow .2s; }
.chat-send textarea::placeholder { color: #575d66; }
.chat-send textarea:focus { outline: none; border-color: var(--green-2);
                            box-shadow: 0 0 0 3px rgba(31,163,126,.13); }
.chat-send .btn { flex: 0 0 auto; padding: 12px 24px; }
.chat-note { margin: 0; padding: 11px 18px; font-size: .75rem; color: var(--muted);
             border-top: 1px solid var(--hair); background: rgba(0,0,0,.14); }

/* ── Legal footer ──────────────────────────────────────── */
.legal { margin-top: 64px; padding-top: 26px; border-top: 1px solid var(--hair); }
.legal-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 16px; }
.legal-links a { font-size: .8rem; font-weight: 700; color: var(--ink-3); }
.legal-links a:hover { color: var(--green-3); }
.legal-text { margin: 0 0 12px; font-size: .74rem; line-height: 1.7; color: var(--muted); max-width: 88ch; }
.legal-copy { margin: 0; font-size: .74rem; color: #5b6069; }

@media (max-width: 900px) {
  .chat-log { height: min(52vh, 420px); padding: 16px 16px 6px; }
  .chat-send { padding: 12px 14px; }
  .chat-send .btn { padding: 12px 18px; }
}

/* ── Course card depth ─────────────────────────────────── */
.chip { display: inline-block; font-size: .61rem; font-weight: 800; letter-spacing: .13em;
        text-transform: uppercase; color: var(--ink-3); background: rgba(255,255,255,.07);
        border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; margin-bottom: 11px; }
.chip.go { color: #06281e; border-color: transparent;
           background: linear-gradient(180deg, var(--green-3), var(--green-2));
           box-shadow: 0 6px 16px -8px var(--green-glow); }
.course .sub-line { margin: -3px 0 9px; font-size: .845rem; font-weight: 700;
                    color: var(--ink-2); letter-spacing: -.012em; }
.course .outcome { margin: 0 0 15px; font-size: .82rem; line-height: 1.55; color: var(--ink-3);
                   padding-left: 12px; border-left: 2px solid rgba(31,163,126,.35); }
.course .outcome b { color: var(--green-3); font-weight: 800; }
.course.gold .outcome { border-left-color: rgba(245,166,35,.4); }
.course.gold .outcome b { color: var(--gold-2); }
.course.violet .outcome { border-left-color: rgba(139,124,246,.4); }
.course.violet .outcome b { color: var(--violet); }

/* ── How-to tiles ──────────────────────────────────────── */
.howto { position: relative; display: block; color: inherit; padding: 24px 24px 22px;
         border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
         background: linear-gradient(180deg, rgba(255,255,255,.032), transparent 55%), var(--card);
         box-shadow: var(--shadow); animation: rise .5s var(--ease) both;
         transition: transform .26s var(--ease), border-color .26s, box-shadow .26s; }
.howto::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px;
                 background: linear-gradient(90deg, transparent, rgba(79,209,165,.45), transparent);
                 opacity: 0; transition: opacity .26s; }
.howto:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow-lift); }
.howto:hover::before { opacity: 1; }
.howto-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px;
            font-size: 1.05rem; color: var(--green-3); margin-bottom: 15px;
            background: linear-gradient(180deg, rgba(31,163,126,.24), rgba(31,163,126,.07));
            border: 1px solid rgba(31,163,126,.22); }
.howto h3 { margin: 0 0 7px; font-size: 1.04rem; letter-spacing: -.022em; font-weight: 800; }
.howto .what { margin: 0 0 13px; font-size: .875rem; color: var(--ink-2); line-height: 1.55; }
.howto .how { margin: 0; font-size: .82rem; color: var(--ink-3); line-height: 1.6;
              padding-top: 13px; border-top: 1px solid var(--hair); }
.howto .how b { display: block; color: var(--gold-2); font-size: .63rem; font-weight: 800;
                letter-spacing: .14em; text-transform: uppercase; margin-bottom: 5px; }

/* Keep the brand on one line; drop the wordmark where there isn't room. */
.brand { white-space: nowrap; min-width: 0; }
@media (max-width: 560px) {
  .brand span { display: none; }
  /* Too easy to hit by accident next to the menu and avatar, and signing back
     in is a whole round trip. It lives at the bottom of the profile instead. */
  #out { display: none; }
  .top { gap: 10px; padding: 0 14px; }
  .main { padding-left: 14px; padding-right: 14px; }
  .video { padding: 18px; }
}

/* ── Avatars with uploaded pictures ────────────────────── */
/* Initials avatars get a per-member hue inline (avStyle). This just keeps
   the shadow neutral so it works for every hue. */
.av[style] { box-shadow: 0 6px 16px -8px rgba(0,0,0,.75); }
.av.has-img { background: var(--raise); padding: 0; overflow: hidden; }
.av.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-lg { width: 92px; height: 92px; font-size: 1.6rem; border-radius: 50%; }
.msg.mine .av.has-img, .av.has-img { box-shadow: 0 6px 16px -8px rgba(0,0,0,.8); }

.me { display: inline-flex; border-radius: 50%; transition: transform .18s var(--ease); }
.me:hover { transform: scale(1.06); }
.me .av { width: 32px; height: 32px; font-size: .72rem; border: 1px solid var(--line-2); }

/* ── Profile page ──────────────────────────────────────── */
.profile-card { max-width: 560px; }
.profile-top { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; flex-wrap: wrap; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.profile-actions .sub { flex: 1 0 100%; margin: 2px 0 0; font-size: .78rem; color: var(--muted); }
.pf-label { display: block; font-size: .7rem; color: var(--muted); font-weight: 800;
            text-transform: uppercase; letter-spacing: .13em; margin-bottom: 8px; }
#pf-name { width: 100%; background: rgba(0,0,0,.4); border: 1px solid var(--line-2); color: var(--ink);
           font: inherit; padding: 13px 15px; border-radius: 12px; transition: border-color .2s; }
#pf-name::placeholder { color: #575d66; }
#pf-name:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(31,163,126,.13); }
.profile-foot { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.profile-foot .err { margin: 0; flex: 1; }
.profile-foot .btn { margin-left: auto; padding: 11px 28px; }

/* Lesson video: the iframe fills the frame; the empty states sit centred. */
.video > div { max-width: 44ch; }
.video b { display: block; color: var(--ink-2); font-size: .95rem; margin-bottom: 6px; }
.video p { margin: 0; font-size: .86rem; }

/* ── Image attachments ─────────────────────────────────── */
.att:empty { display: none; }
.att { margin-top: 12px; }
.att-loading { font-size: .82rem; color: var(--muted); }
.att-item { position: relative; display: inline-block; }
.att-item img { max-height: 110px; border-radius: 10px; border: 1px solid var(--line-2); display: block; }
.att-x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
         border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2);
         cursor: pointer; font-size: .7rem; line-height: 1; display: grid; place-items: center; }
.att-x:hover { color: #f87171; border-color: rgba(248,113,113,.5); }

.img-btn { flex: 0 0 auto; padding: 9px 14px; }
.composer-foot .img-btn { margin-right: auto; }
.composer-foot .err { flex: 0 1 auto; }

/* Dropping a file anywhere on a composer highlights it. */
.composer.drop, .chat-send.drop, .reply-box.drop {
  outline: 2px dashed var(--green-2); outline-offset: 3px; border-radius: 14px;
}

/* Posted images: capped so a tall screenshot can't run away with the page. */
.shot { display: block; margin-top: 13px; border-radius: 12px; overflow: hidden;
        border: 1px solid var(--line); max-width: 520px; }
.shot img { display: block; width: 100%; max-height: 460px; object-fit: contain;
            background: #000; transition: opacity .2s; }
.shot:hover img { opacity: .93; }
.reply .shot, .msg-in .shot { max-width: 380px; }

/* ── Chapter checks ────────────────────────────────────── */
.chapter.locked { opacity: .55; }
.chapter.locked > button { cursor: not-allowed; }
.chapter .num.lock { background: rgba(255,255,255,.06); color: var(--muted);
                     border-color: var(--line); font-size: .6rem; }

.quiz-row { margin-top: 4px; border-top: 1px solid var(--hair); padding-top: 6px; }
.quiz-row button { font-weight: 700; color: var(--gold-3); }
.quiz-row .tick { border-color: rgba(245,166,35,.45); color: var(--gold-3); font-weight: 800; }
.quiz-row .tick.done { background: linear-gradient(180deg, var(--green-2), var(--green));
                       border-color: transparent; color: #fff; }
.quiz-row .dur { color: var(--gold-3); }

.quiz { display: block; }
.qa { border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 12px;
      background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 60%), var(--card);
      box-shadow: var(--shadow); transition: border-color .25s; }
.qa.ok { border-color: rgba(31,163,126,.45); }
.qa.no { border-color: rgba(248,113,113,.4); }
.qn { margin: 0 0 14px; font-weight: 700; font-size: 1rem; letter-spacing: -.015em; line-height: 1.4; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: flex-start; gap: 11px; padding: 11px 14px; border-radius: 11px;
       border: 1px solid var(--line); cursor: pointer; font-size: .92rem; color: var(--ink-2);
       transition: background .15s, border-color .15s; }
.opt:hover { background: rgba(255,255,255,.04); border-color: var(--line-2); }
.opt input { margin: 3px 0 0; accent-color: var(--green-2); flex: 0 0 auto; }
.opt:has(input:checked) { border-color: var(--green-2); background: rgba(31,163,126,.09); color: var(--ink); }

.why { margin-top: 14px; padding: 13px 16px; border-radius: 0 12px 12px 0;
       border-left: 2px solid var(--line-2); background: rgba(255,255,255,.03); font-size: .88rem; }
.qa.ok .why { border-left-color: var(--green-2); background: rgba(31,163,126,.08); }
.qa.no .why { border-left-color: #f87171; background: rgba(248,113,113,.07); }
.why b { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
         margin-bottom: 5px; color: var(--ink-3); }
.qa.ok .why b { color: var(--green-3); }
.qa.no .why b { color: #fca5a5; }
.why span { color: var(--ink-2); line-height: 1.6; }

.quiz-foot { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.quiz-foot .err { flex: 1 1 200px; margin: 0; }
.quiz-pass { margin-bottom: 16px; padding: 15px 18px; border-radius: var(--r); font-weight: 700;
             color: var(--green-3); border: 1px solid rgba(31,163,126,.32);
             background: linear-gradient(180deg, rgba(31,163,126,.14), rgba(31,163,126,.04)); }
.quiz-pass a { margin-left: 8px; }

/* ── Unread badges ─────────────────────────────────────── */
.nav a .unread { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; font-size: .66rem; font-weight: 800; letter-spacing: 0;
  color: #06281e; background: linear-gradient(180deg, var(--green-3), var(--green-2));
  box-shadow: 0 4px 12px -5px var(--green-glow); }
.nav a .tag + .unread { margin-left: 8px; }

/* ── Notification settings ─────────────────────────────── */
/* A pasted Loom or spreadsheet link is one long unbreakable token; without
   this it pushes the whole page sideways on a phone. */
.rich, .body, .rx, .msg-in p { overflow-wrap: anywhere; }
.rich a, .body a, .msg-in a { overflow-wrap: anywhere; word-break: break-word; }

/* Draws the eye to the steps when someone arrives here from the corner card. */
@keyframes flashcard {
  0%, 100% { box-shadow: var(--shadow); }
  25%, 75% { box-shadow: 0 0 0 2px var(--gold-2), 0 18px 40px -14px rgba(0,0,0,.7); }
}
.phone-steps.flash { animation: flashcard 1.5s var(--ease); }

.quiz-note { max-width: 760px; margin: -6px 0 22px; padding: 10px 14px; border-radius: 10px;
             font-size: .78rem; line-height: 1.5; color: var(--muted);
             background: rgba(255,255,255,.03); border: 1px solid var(--hair); }

/* ── Written lessons ──────────────────────────────────── */
.lesson-note { padding: 26px 30px; border-radius: var(--r-lg); border: 1px solid var(--line);
               background: linear-gradient(180deg, rgba(255,255,255,.028), transparent 55%), var(--card);
               box-shadow: var(--shadow); animation: rise .45s var(--ease) both; }
.lesson-note h4 { margin: 26px 0 12px; font-size: 1.02rem; letter-spacing: -.02em; color: var(--gold-2); }
.lesson-note h4:first-child { margin-top: 0; }
.lesson-note p { margin: 0 0 13px; font-size: .93rem; line-height: 1.65; color: var(--ink-2); }
.lesson-note ul { margin: 0 0 13px; padding-left: 20px; }
.lesson-note li { font-size: .92rem; line-height: 1.6; color: var(--ink-2); margin-bottom: 8px; }
.lesson-note strong { color: var(--ink); }
.lesson-note hr { border: 0; border-top: 1px solid var(--hair); margin: 22px 0; }
@media (max-width: 560px) { .lesson-note { padding: 20px 18px; } }

/* ── Lesson downloads ──────────────────────────────────── */
.lesson-files { margin-top: 20px; }
.lesson-files .pf-label { margin-bottom: 10px; }
.lfile { display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit;
         padding: 13px 16px; margin-bottom: 9px; border-radius: 13px;
         border: 1px solid var(--line-2); background: rgba(255,255,255,.035);
         transition: border-color .18s var(--ease), background .18s var(--ease),
                     transform .16s var(--ease); }
.lfile:hover { border-color: var(--green-2); background: rgba(31,163,126,.1);
               transform: translateY(-1px); }
.lf-ic { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; display: grid;
         place-items: center; font-weight: 800; font-size: .95rem; color: var(--green-3);
         background: rgba(31,163,126,.16); border: 1px solid rgba(31,163,126,.32); }
.lf-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lf-txt b { font-size: .92rem; letter-spacing: -.015em; }
.lf-meta { font-size: .76rem; color: var(--muted); }

/* ── Sign out ──────────────────────────────────────────── */
.signout { max-width: 560px; display: flex; align-items: center; gap: 18px;
           flex-wrap: wrap; justify-content: space-between; }
.signout > div { flex: 1 1 220px; }
.signout b { display: block; font-size: .95rem; letter-spacing: -.015em; }
.signout p { margin: 5px 0 0; font-size: .83rem; color: var(--ink-3); line-height: 1.5; }
.danger { flex: 0 0 auto; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700;
          padding: 11px 24px; border-radius: 11px; color: #ff9b9b;
          background: rgba(214,60,60,.12); border: 1px solid rgba(214,60,60,.42);
          transition: background .18s var(--ease), border-color .18s var(--ease),
                      color .18s var(--ease); }
.danger:hover { background: rgba(214,60,60,.22); border-color: rgba(214,60,60,.7); color: #ffbdbd; }
@media (max-width: 560px) { .danger { flex: 1 1 100%; } }

/* ── Phone install steps, on the profile ───────────────── */
/* Two columns on a desktop so iPhone and Android read side by side; stacked
   on a phone, where you only care about one of them anyway. */
.phone-steps { max-width: 560px; margin-top: 14px; }
.phone-steps > b { display: block; font-size: 1.02rem; letter-spacing: -.022em;
                   color: var(--gold-2); margin-bottom: 6px; }
.phone-steps .lede { margin: 0 0 18px; font-size: .87rem; color: var(--ink-3); line-height: 1.55; }
.steps-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px; }
.steps-cols .pf-label { margin-bottom: 9px; }
.steps-cols ol { margin: 0; padding-left: 17px; }
.steps-cols li { font-size: .82rem; color: var(--ink-3); line-height: 1.55; margin-bottom: 7px; }
.steps-cols b { color: var(--ink); font-weight: 700; }
.phone-steps .sub { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--hair);
                    font-size: .8rem; color: var(--muted); line-height: 1.5; }

/* ── Install reminder ──────────────────────────────────── */
/* Bottom-left so it never sits under the composer or the send button, which
   are both bottom-right. Gold, because the rest of the UI is green. */
.install-card { position: fixed; left: 20px; bottom: 20px; z-index: 80; width: 325px;
                max-width: calc(100vw - 32px); padding: 18px 20px 17px;
                border-radius: var(--r-lg); border: 1px solid rgba(245,166,35,.42);
                background: radial-gradient(420px 180px at 0% 0%, rgba(245,166,35,.15), transparent 62%), var(--card);
                box-shadow: 0 22px 54px -16px rgba(0,0,0,.85);
                animation: rise .5s var(--ease) both; }
/* The headline is the highlight now that the eyebrow above it is gone. */
.install-card > b { display: block; font-size: 1.1rem; letter-spacing: -.022em;
                    color: var(--gold-2); margin-bottom: 7px; }
.install-card .lede { margin: 0 0 11px; font-size: .83rem; color: var(--ink-3); line-height: 1.55; }
.install-foot { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.install-foot .btn { padding: 9px 18px; font-size: .84rem; }
.install-foot .ghost { padding: 9px 14px; font-size: .78rem; color: var(--muted); }
.install-card .x { position: absolute; top: 10px; right: 11px; border: 0; background: none;
                   color: var(--muted); font-size: .9rem; cursor: pointer; line-height: 1;
                   padding: 5px; border-radius: 7px; }
.install-card .x:hover { color: var(--ink); background: rgba(255,255,255,.07); }
@media (max-width: 560px) {
  .install-card { left: 16px; right: 16px; bottom: 16px; width: auto; }
  .install-foot .btn, .install-foot .ghost { flex: 1 1 auto; text-align: center; }
}

/* ── Reactions ─────────────────────────────────────────── */
.rx { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; align-items: center; }
/* With no reactions the row costs nothing: zero height, and the + is lifted
   out of the flow into the corner of the message. */
.rx.none { margin-top: 0; height: 0; }
.rx.none .chip.add { position: absolute; right: 0; bottom: 0; }
.post { position: relative; }
.post > .rx.none .chip.add { right: 0; bottom: -6px; }
/* Chat is dense by nature, so its chips run smaller than the feeds'. */
.msg .rx { margin-top: 5px; }
.msg .rx .chip { padding: 2px 7px; font-size: .74rem; }
.msg .rx .chip .e { font-size: .84rem; }
.msg .rx.none .chip.add { top: 0; bottom: auto; }
.rx .chip { display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
            padding: 3px 9px; border-radius: 999px; font: inherit; font-size: .8rem;
            line-height: 1.5; color: var(--ink-3); background: rgba(255,255,255,.05);
            border: 1px solid var(--line-2);
            transition: background .15s var(--ease), border-color .15s var(--ease),
                        transform .12s var(--ease); }
.rx .chip:hover { border-color: var(--line); transform: translateY(-1px); }
.rx .chip .e { font-size: .92rem; line-height: 1; }
.rx .chip .n { font-weight: 700; font-variant-numeric: tabular-nums; }
.rx .chip.mine { background: rgba(31,163,126,.16); border-color: rgba(31,163,126,.5);
                 color: var(--ink); }
/* The add button stays quiet until you're on the message. */
.rx .chip.add { padding: 3px 10px; font-size: .95rem; font-weight: 700; color: var(--muted);
                opacity: 0; transition: opacity .15s var(--ease), border-color .15s var(--ease); }
.msg:hover .rx .chip.add, .post:hover .rx .chip.add, .reply:hover .rx .chip.add,
.rx .chip.add:focus-visible { opacity: 1; }
/* No hover on a touch screen, so it is always there. */
@media (hover: none) { .rx .chip.add { opacity: 1; } }

.rx-pop { position: fixed; z-index: 90; display: grid; grid-template-columns: repeat(8, 1fr);
          gap: 2px; padding: 9px; max-width: 288px; border-radius: 14px;
          background: var(--raise); border: 1px solid var(--line-2);
          box-shadow: 0 18px 44px -12px rgba(0,0,0,.8); animation: rise .16s var(--ease) both; }
.rx-pop button { cursor: pointer; border: 0; background: none; font-size: 1.15rem;
                 line-height: 1; padding: 6px; border-radius: 8px;
                 transition: background .12s var(--ease), transform .12s var(--ease); }
.rx-pop button:hover { background: rgba(255,255,255,.1); transform: scale(1.18); }

.notif { max-width: 560px; }
.notif-row { display: flex; align-items: flex-start; gap: 20px; }
.notif-row > div { flex: 1; }
.notif-row b { font-size: .97rem; }
.notif-row p { margin: 5px 0 0; font-size: .87rem; color: var(--ink-3); line-height: 1.55; }
.notif-row .btn, .notif-row .ghost { flex: 0 0 auto; padding: 10px 20px; }
.notif-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--hair);
              font-size: .84rem; color: var(--ink-3); line-height: 1.6; }
.notif-note:empty { display: none; }

/* Per-feed notification switches. Tappable pills rather than checkboxes so
   they work as well under a thumb as under a mouse. */
.notif-feeds { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair); }
.notif-feeds .pf-label { margin-bottom: 10px; }
.nswitches { display: flex; flex-wrap: wrap; gap: 9px; }
.nswitch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
        padding: 9px 15px 9px 12px; border-radius: 999px; font: inherit; font-size: .84rem;
        font-weight: 700; letter-spacing: -.01em; color: var(--ink-3);
        background: rgba(255,255,255,.04); border: 1px solid var(--line-2);
        transition: background .18s var(--ease), border-color .18s var(--ease),
                    color .18s var(--ease); }
.nswitch:hover { border-color: var(--line); color: var(--ink); }
.nswitch .tick { width: 16px; height: 16px; flex: 0 0 auto; border-radius: 50%;
              border: 1.5px solid var(--line-2); position: relative;
              transition: background .18s var(--ease), border-color .18s var(--ease); }
.nswitch.on { color: var(--ink); border-color: rgba(31,163,126,.5);
           background: rgba(31,163,126,.13); }
.nswitch.on .tick { background: var(--green-2); border-color: var(--green-2); }
/* The check mark itself, drawn rather than a glyph so it sits dead centre. */
.nswitch.on .tick::after { content: ""; position: absolute; left: 4.5px; top: 1.5px;
                        width: 4px; height: 8px; border: solid #fff;
                        border-width: 0 2px 2px 0; transform: rotate(45deg); }
.notif-feeds .sub { margin: 12px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 560px) { .nswitch { flex: 1 1 calc(50% - 5px); justify-content: center; } }
#np-test { margin-top: 14px; }

/* iPhone install instructions inside the notification panel. */
.notif-note .ios-h { display: block; color: var(--gold-2); margin-bottom: 7px; font-size: .9rem; }
.ios-steps { margin: 12px 0 10px; padding-left: 20px; display: grid; gap: 7px; }
.ios-steps li { color: var(--ink-2); line-height: 1.55; }
.ios-steps b { color: var(--ink); }

/* ── Notification invite ───────────────────────────────── */
.nudge { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  margin-bottom: 26px; padding: 18px 20px; border-radius: var(--r-lg);
  border: 1px solid rgba(245,166,35,.28);
  background: radial-gradient(520px 200px at 0% 0%, rgba(245,166,35,.12), transparent 62%), var(--card);
  box-shadow: var(--shadow); animation: rise .45s var(--ease) both; }
.nudge > div { flex: 1 1 280px; }
.nudge > div > b { display: block; font-size: .97rem; color: var(--gold-2); margin-bottom: 5px; }
.nudge p { margin: 0; font-size: .87rem; color: var(--ink-2); line-height: 1.55; }
.nudge .ios-steps { margin: 11px 0 0; }
.nudge .btn, .nudge .ghost { flex: 0 0 auto; padding: 10px 20px; }
@media (max-width: 560px) { .nudge .btn, .nudge .ghost { flex: 1 1 auto; } }

/* ── Formatted post bodies ─────────────────────────────── */
.body.rich { white-space: normal; }
.body.rich > *:first-child { margin-top: 0; }
.body.rich > *:last-child { margin-bottom: 0; }
.body.rich p { margin: 0 0 12px; }
.body.rich h4 { margin: 24px 0 10px; font-size: .78rem; font-weight: 800; letter-spacing: .13em;
                text-transform: uppercase; color: var(--gold-2); }
.body.rich h4:first-child { margin-top: 0; }
.body.rich hr { border: 0; height: 1px; margin: 20px 0;
                background: linear-gradient(90deg, var(--line-2), transparent); }
.body.rich ul, .body.rich ol { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 7px; }
.body.rich li { line-height: 1.6; }
.body.rich li::marker { color: var(--green-3); font-weight: 700; }
.body.rich strong { color: var(--ink); font-weight: 700; }
.body.rich a { text-decoration: underline; text-underline-offset: 2px; }
/* A pasted link in chat has to read as a link, not just as text. */
.msg-in p a { color: var(--green-3); text-decoration: underline; text-underline-offset: 2px; }
.msg-in p a:hover { color: var(--ink); }
.reply .body.rich p { margin: 0 0 8px; }

/* Pointer from the chat to Expert Q&A, where answers actually stick. */
/* ── Chat quote-replies ────────────────────────────────── */
/* The reply action stays quiet until you're on the message, same as the + */
.reply-btn { background: none; border: 0; cursor: pointer; font: inherit; font-size: .72rem;
             font-weight: 700; color: var(--muted); padding: 2px 6px; border-radius: 6px;
             margin-left: 6px; opacity: 0; transition: opacity .15s var(--ease), color .15s var(--ease); }
.msg:hover .reply-btn, .reply-btn:focus-visible { opacity: 1; }
.reply-btn:hover { color: var(--green-3); background: rgba(31,163,126,.12); }
@media (hover: none) { .reply-btn { opacity: 1; } }

/* The quoted original, sitting above the reply */
.msg-quote { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left;
             cursor: pointer; font: inherit; margin: 2px 0 6px; padding: 6px 10px;
             border: 0; border-left: 3px solid var(--green-2); border-radius: 0 8px 8px 0;
             background: rgba(255,255,255,.045); transition: background .15s var(--ease); }
.msg-quote:hover { background: rgba(31,163,126,.14); }
.msg-quote b { font-size: .76rem; color: var(--green-3); }
.msg-quote span { font-size: .8rem; color: var(--ink-3); overflow: hidden;
                  text-overflow: ellipsis; white-space: nowrap; }

/* Brief highlight when you jump to the original */
@keyframes flashmsg { 0%,100% { background: transparent; } 30% { background: rgba(31,163,126,.18); } }
.msg.flash-msg { animation: flashmsg 1.4s var(--ease); border-radius: 10px; }

/* "Replying to …" above the composer */
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px;
             border-top: 1px solid var(--hair); background: rgba(31,163,126,.07); }
.reply-bar .rb-tag { flex: 0 0 auto; font-size: .76rem; color: var(--ink-3); }
.reply-bar .rb-tag b { color: var(--green-3); }
.reply-bar .rb-text { flex: 1 1 auto; min-width: 0; font-size: .78rem; color: var(--muted);
                      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar .rb-x { flex: 0 0 auto; background: none; border: 0; cursor: pointer;
                   color: var(--muted); font-size: .8rem; padding: 4px 6px; border-radius: 6px; }
.reply-bar .rb-x:hover { color: var(--ink); background: rgba(255,255,255,.08); }

/* ── Chat: full-bleed, one scroll context ──────────────── */
/* Two problems, same fix. The log used to be a fixed 58vh box inside a page
   that also scrolled, so two scrollbars fought each other. And 197px of a
   laptop screen sat above the first message — page padding, a heading block
   and a tip box, each with its own margin. The room now fills the frame: one
   compact title row, the log, the composer. Nothing decorative in between. */
.main.is-chat { height: calc(100vh - var(--top-h)); height: calc(100dvh - var(--top-h));
                min-height: 0; max-width: none; padding: 0; display: flex;
                flex-direction: column; overflow: hidden; }
.main.is-chat .page-head { flex: 0 0 auto; display: flex; align-items: baseline; gap: 14px;
                           flex-wrap: wrap; margin: 0; padding: 12px 22px 10px;
                           border-bottom: 1px solid var(--hair); }
.main.is-chat .page-head .eyebrow { display: none; }
.main.is-chat .page-head h1 { font-size: 1.22rem; margin: 0; letter-spacing: -.025em; }
/* The tip rides on the title row rather than owning a block of its own. */
.main.is-chat .chat-tip { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0;
                          border: 0; background: none; font-size: .8rem; }
.main.is-chat .chat { flex: 1 1 auto; min-height: 0; border: 0; border-radius: 0;
                      box-shadow: none; background: none; animation: none; }
.main.is-chat .chat-log { padding: 16px 22px 8px; }
.main.is-chat .chat-send { border-top: 1px solid var(--hair); padding: 12px 22px; }

@media (max-width: 560px) {
  .main.is-chat .page-head { padding: 10px 14px 8px; gap: 2px 10px; }
  .main.is-chat .page-head h1 { font-size: 1.1rem; }
  .main.is-chat .chat-tip { font-size: .76rem; }
  .main.is-chat .chat-log { padding: 12px 14px 6px; }
  .main.is-chat .chat-send { padding: 10px 14px; }
  .main.is-chat .chat-send .btn { padding: 11px 16px; }
}

.chat-tip { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline;
  margin-bottom: 18px; padding: 14px 18px; border-radius: var(--r);
  border: 1px solid rgba(31,163,126,.26);
  background: linear-gradient(90deg, rgba(31,163,126,.12), rgba(31,163,126,.03));
  font-size: .88rem; line-height: 1.55; }
.chat-tip b { color: var(--green-3); }
.chat-tip span { color: var(--ink-2); }

/* ── 100 Contract Club ─────────────────────────────────── */
.club-hero { margin-bottom: 18px; }
.club-hero .cause { margin-top: 20px; padding: 16px 18px; border-radius: 14px;
  border-left: 2px solid var(--gold); background: linear-gradient(90deg, rgba(245,166,35,.12), rgba(245,166,35,.02)); }
.club-hero .cause b { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--gold-2); margin-bottom: 6px; }
.club-hero .cause p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.6; max-width: 58ch; }

.goal { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 24px 26px;
  border-radius: var(--r-lg); border: 1px solid rgba(245,166,35,.24);
  background: radial-gradient(540px 200px at 0% 50%, rgba(245,166,35,.12), transparent 65%), var(--card);
  box-shadow: var(--shadow); }
.goal-n { font-size: 2.4rem; font-weight: 800; letter-spacing: -.045em; line-height: 1;
  background: linear-gradient(100deg, var(--gold-3), var(--gold)); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.goal b { display: block; font-size: 1rem; letter-spacing: -.015em; }
.goal span { font-size: .85rem; color: var(--ink-3); }

.winners { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.winner { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  background: var(--card); box-shadow: var(--shadow); animation: rise .5s var(--ease) both;
  transition: transform .26s var(--ease), border-color .26s; }
.winner:hover { transform: translateY(-3px); border-color: rgba(245,166,35,.4); }
.winner img { display: block; width: 100%; aspect-ratio: 352/480; object-fit: cover; }

/* ── Direct messages ──────────────────────────────────────────────────
   Deliberately quiet: an icon in the corner, not a nav item. Questions
   belong in Expert Q&A where everyone benefits from the answer; this is
   for the ones that genuinely need to be private. */
.dm-btn {
  position: relative; width: 34px; height: 34px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.045); color: var(--ink-3); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.dm-btn:hover { color: var(--ink); border-color: var(--line-2); }
.dm-btn svg { width: 16px; height: 16px; }
.dm-btn .dot {
  position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; background: var(--green);
  color: #fff; font-size: .64rem; font-weight: 800; line-height: 17px;
  text-align: center; border: 2px solid var(--bg);
}

.dm-panel {
  position: fixed; top: calc(var(--top-h) + 8px); right: 16px; z-index: 80;
  width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100dvh - var(--top-h) - 28px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: 0 24px 60px -18px rgba(0,0,0,.85);
}
.dm-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 15px;
  border-bottom: 1px solid var(--hair); flex: 0 0 auto;
}
.dm-head b { font-size: .9rem; font-weight: 800; }
/* The 38px avatar used in a list would swallow this header. */
.dm-head .av { width: 26px; height: 26px; font-size: .62rem; }
.dm-head .back { margin-right: -2px; }
.dm-head .back, .dm-head .x {
  margin: 0; padding: 4px 8px; border: 0; background: none;
  color: var(--ink-3); cursor: pointer; font: inherit; font-size: .9rem;
}
.dm-head .x { margin-left: auto; }
.dm-head .back:hover, .dm-head .x:hover { color: var(--ink); }

.dm-body { overflow-y: auto; padding: 8px; flex: 1 1 auto; }
.dm-note { padding: 14px 16px; color: var(--muted); font-size: .82rem; line-height: 1.6; }

.dm-row {
  display: flex; gap: 11px; align-items: flex-start; width: 100%;
  padding: 11px 12px; border: 0; border-radius: 11px; background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.dm-row:hover { background: rgba(255,255,255,.04); }
.dm-row, .dm-row * { text-transform: none; letter-spacing: normal; }
.dm-row .dm-meta { min-width: 0; flex: 1 1 auto; display: block;
                   text-transform: none; letter-spacing: normal; }
.dm-row .nm { display: flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 700; }
.dm-row .pv {
  color: var(--muted); font-size: .79rem; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dm-row .when { color: var(--muted); font-size: .7rem; flex: 0 0 auto; }
.dm-row .unread {
  width: 8px; height: 8px; border-radius: 999px; background: var(--green); flex: 0 0 auto;
}

.dm-msgs { display: grid; gap: 9px; padding: 12px; }
.dm-msg { max-width: 82%; padding: 9px 12px; border-radius: 13px;
          font-size: .86rem; line-height: 1.55; overflow-wrap: anywhere; }
.dm-msg.them { background: rgba(255,255,255,.055); border-top-left-radius: 5px; }
.dm-msg.mine { background: var(--green); color: #fff; margin-left: auto; border-top-right-radius: 5px; }
.dm-msg .at { display: block; margin-top: 4px; font-size: .66rem; opacity: .62; }
.dm-msg a { color: inherit; text-decoration: underline; }

.dm-send { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--hair); flex: 0 0 auto; }
.dm-send textarea {
  flex: 1 1 auto; min-height: 38px; max-height: 110px; resize: none;
  padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(0,0,0,.25); color: var(--ink); font: inherit; font-size: .86rem;
}
.dm-send button {
  flex: 0 0 auto; padding: 0 15px; border: 0; border-radius: 10px;
  background: var(--green); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.dm-send button:disabled { opacity: .5; cursor: default; }

@media (max-width: 560px) {
  .dm-panel { right: 8px; left: 8px; width: auto; }
}

/* A name you can write to. Quiet until you touch it — the feeds shouldn't
   look like a directory of buttons. */
.dm-name {
  cursor: pointer; border-bottom: 1px dashed transparent;
  transition: color .15s, border-color .15s;
}
.dm-name:hover, .dm-name:focus-visible {
  color: var(--green-3); border-bottom-color: var(--green-3); outline: none;
}
