/* ======================================================================
   Member pages, second pass: easier reading on the blue, and a proper
   phone layout (slim header, tabs in a bar along the bottom).
   Loaded last on every signed-in page.
   ====================================================================== */

/* ---------- reading on the blue ---------- */
/* small capitals sitting on the page use the deep blue (8:1) rather than the brand blue */
.mx-head h2, .fs-h, .lib-sub, .lib-tags .lbl { color: var(--ink); }
.lv-eyebrow { color: var(--blue-deep); }
/* section rules: a quiet line, not a heavy grey bar */
.mx-head { border-top: 1px solid rgba(15, 27, 45, .22); }
.mx-sec[data-sec] > .mx-head .aside, .mx-head .aside a { font-weight: 500; }

/* ---------- next live: no date yet ---------- */
.mx-live.empty { grid-template-columns: minmax(0, 1fr) 260px; align-items: center; }
.mx-live.empty .lv-date { font-size: clamp(44px, 6vw, 76px); margin-top: 16px; }
.lv-brew { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.lv-soon { margin-top: 14px; max-width: 46ch; white-space: pre-line; font-size: 17.5px; line-height: 1.6; color: var(--ink-2); }
.mx-live.empty .mx-actions { margin-top: 22px; }
.lv-last { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 10px 16px 10px 10px; max-width: 460px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); color: var(--ink); transition: border-color .15s ease, background-color .15s ease; }
.lv-last:hover { text-decoration: none; border-color: var(--blue); background: #fff; }
.lv-last img, .lv-last-ph { width: 96px; aspect-ratio: 16 / 9; flex: none; border-radius: 8px; object-fit: cover; }
.lv-last-ph { display: grid; place-items: center; background: var(--blue-tint); color: var(--blue); }
.lv-last-ph svg { width: 22px; height: 22px; }
.lv-last span { display: grid; gap: 3px; min-width: 0; }
.lv-last small { font: 600 12.5px/1.2 var(--head); color: var(--ink-3); }
.lv-last b { font: 700 15px/1.3 var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a calendar page still waiting for its date */
.lv-cal { display: grid; justify-items: center; overflow: hidden; border-radius: 20px; background: #fff; border: 1px solid #cfdcf2; box-shadow: 0 18px 40px -18px rgba(3, 71, 175, .45); transform: rotate(2deg); }
.lv-cal-top { justify-self: stretch; padding: 12px; text-align: center; background: var(--blue); color: #fff; font: 700 13px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; }
.lv-cal-day { display: flex; gap: 12px; padding: 44px 0 36px; }
.lv-cal-day i { width: 16px; height: 16px; border-radius: 50%; background: var(--blue); animation: lv-dots 1.5s ease-in-out infinite; }
.lv-cal-day i:nth-child(2) { animation-delay: .18s; }
.lv-cal-day i:nth-child(3) { animation-delay: .36s; }
@keyframes lv-dots { 0%, 70%, 100% { opacity: .22; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .lv-cal-day i { animation: none; opacity: .6; } }
.lv-cal-foot { padding: 12px 18px 16px; border-top: 1px dashed var(--line); justify-self: stretch; text-align: center; font-size: 13px; line-height: 1.4; color: var(--ink-3); }
@media (max-width: 960px) {
  .mx-live.empty { grid-template-columns: minmax(0, 1fr) 180px; }
  .lv-cal-day { padding: 30px 0 24px; }
}
@media (max-width: 640px) {
  .mx-live.empty { grid-template-columns: 1fr; }
  .mx-live.empty .lv-date { font-size: 40px; margin-top: 12px; }
  .lv-cal { display: none; }
  .lv-soon { font-size: 16px; }
  .mx-live.empty .mx-actions .btn { flex: 1; }
  .lv-last { margin-top: 18px; }
  .lv-last img, .lv-last-ph { width: 76px; }
}

/* ---------- the bottom tab bar (phones only) ---------- */
.m-dock, .md-sheet { display: none; }
@media (max-width: 760px) {
  body.signed-in, body.members { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .m-dock {
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 120;
    display: flex; padding: 6px; gap: 2px;
    background: rgba(255, 255, 255, .96); backdrop-filter: saturate(160%) blur(12px);
    border: 1px solid rgba(255, 255, 255, .8); border-radius: 20px;
    box-shadow: 0 14px 34px -12px rgba(15, 30, 60, .4);
  }
  .m-dock a, .m-dock button {
    flex: 1; min-width: 0; display: grid; justify-items: center; gap: 3px; padding: 7px 2px 6px;
    border: 0; border-radius: 14px; background: none; cursor: pointer;
    font: 600 11px/1.1 var(--head); color: var(--ink-2); -webkit-tap-highlight-color: transparent;
  }
  .m-dock a[hidden] { display: none; }
  .m-dock span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-dock svg, .md-panel svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .m-dock .md-more svg circle { fill: currentColor; stroke: none; }
  .m-dock a:hover { text-decoration: none; }
  .m-dock .on { color: var(--blue); background: var(--blue-tint); }
  .m-dock a[href="/roundtable"][data-live] { color: #c4303a; }
  .m-dock a[href="/roundtable"][data-live].on { background: #fdeceb; }

  /* More: a sheet that rises from the bar */
  .md-sheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 130; }
  .md-scrim { position: absolute; inset: 0; background: rgba(8, 18, 36, .38); animation: md-fade .2s ease both; }
  .md-panel {
    position: absolute; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 8px; background: #fff; border-radius: 22px; box-shadow: 0 24px 60px -18px rgba(8, 18, 36, .5);
    animation: md-rise .26s cubic-bezier(.16, 1, .3, 1) both;
  }
  .md-me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; color: var(--ink); }
  .md-me .avatar { width: 44px; height: 44px; }
  .md-me > span:last-child { display: grid; gap: 2px; min-width: 0; }
  .md-me b { font: 700 16px/1.2 var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .md-me small { font-size: 13px; color: var(--ink-3); }
  .md-links { display: grid; margin: 4px 0; padding: 4px 0; border-block: 1px solid var(--line); }
  .md-links a, .md-out { display: flex; align-items: center; gap: 14px; padding: 13px 12px; border: 0; border-radius: 12px; background: none; width: 100%; cursor: pointer; font: 600 16px/1.2 var(--head); color: var(--ink); text-align: left; }
  .md-links a[hidden] { display: none; }
  .md-links svg, .md-out svg { color: var(--ink-3); }
  .md-links a.on, .md-me.on { background: var(--blue-tint); color: var(--blue); }
  .md-links a.on svg { color: var(--blue); }
  .md-me:hover, .md-links a:hover { text-decoration: none; background: var(--bg-soft); }
  .md-out { color: var(--ink-2); }
  @keyframes md-fade { from { opacity: 0; } }
  @keyframes md-rise { from { opacity: 0; transform: translateY(16px); } }

  /* the header shrinks to a slim bar: logo and your picture */
  .members .m-tabs, .signed-in .member-nav .m-tabs, .members .m-user .btn, .signed-in .member-nav .m-user .btn, .members .m-name, .signed-in .member-nav .m-name { display: none; }
  .nav .nav-inner:has(> .m-tabs) { height: 56px; padding: 0 8px 0 14px; flex-wrap: nowrap; }
  .members .nav-logo .logo-word, .signed-in .member-nav .logo-word { display: none; }
  .members .nav-logo .logo-mark, .signed-in .member-nav .logo-mark { display: block; width: 32px; height: 32px; border-radius: 8px; }
  .m-me { padding: 2px; }

  /* host bar: one slim line */
  .host-bar .hb-text { display: none; }
  .host-bar .wrap { flex-wrap: nowrap; gap: 8px; padding-block: 8px; }
  .host-bar .hb-actions { margin-left: auto; flex-wrap: nowrap; }
  .host-bar .hb-btn { height: 34px; padding: 0 10px; font-size: 13px; }
  .host-bar .hb-main[href="/studio"] { display: none; }
  .rt-banner .rtb-t span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .md-scrim, .md-panel { animation: none; } }

/* ---------- phones: tighter cards, calmer type ---------- */
@media (max-width: 640px) {
  .mx-live { margin-top: 12px; padding: 16px; gap: 16px; }
  .lv-photo { min-height: 0; aspect-ratio: 16 / 8; }
  .lv-photo img { border-radius: 10px; object-position: 50% 22%; }
  .lv-eyebrow { font-size: 11.5px; letter-spacing: .14em; }
  .lv-date { font-size: 44px; margin-top: 12px; }
  .lv-time { font-size: 18px; margin-top: 8px; }
  .lv-title { font-size: 20px; margin-top: 16px; }
  .lv-desc { font-size: 16px; line-height: 1.6; }
  .mx-live .mx-actions { margin-top: 18px; gap: 14px; }
  .mx-live .mx-actions .btn-primary { flex: 1; }
  .mx-note { margin-top: 12px; padding: 18px; }
  .mx-note blockquote { font-size: 17.5px; line-height: 1.55; }
  .mx-sec { padding-top: 32px; }
  .mx-head h2, .mx-note h2 { font-size: 13px; letter-spacing: .1em; }
  .pst { padding: 16px 16px 10px; }
  .pst h3 { font-size: 19px; }
  .pst .post-body { font-size: 16px; line-height: 1.65; }
  .feed { gap: 12px; }
}

/* ---------- fixes found in the phone pass ---------- */
/* the feed's filter row could push the whole page sideways */
@media (max-width: 960px) { .feed-side, .fs-browse, .fs-browse .ptabs { min-width: 0; max-width: 100%; } }
.host-bar .hb-label { white-space: nowrap; }
@media (max-width: 760px) {
  /* the full logo fits now the bar only holds it and your picture */
  .members .nav-logo .logo-word, .signed-in .member-nav .logo-word { display: block; height: 30px; }
  .members .nav-logo .logo-mark, .signed-in .member-nav .logo-mark { display: none; }
}
@media (max-width: 640px) {
  /* community: categories and New thread share one row */
  .cm { padding-top: 14px; gap: 14px; }
  .cm-side { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .cm-cats { order: 1; }
  .cm-new { order: 2; width: auto; height: 42px; padding: 0 14px; font-size: 14px; }
  .cm-head h1 { font-size: 28px; }
  .cm-head p { font-size: 16px; }
  /* page intros on the blue */
  .bk-head h1 { font-size: 28px; }
}

/* ---------- roundtables coming up (members area) ---------- */
.mx-rtup { margin-top: 16px; padding: 20px 24px 22px; background: #fff; border: 1px solid var(--page-line); border-radius: 18px; }
.rtup-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rtup-h h2 { font: 800 15px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; }
.rtup-h a { font-size: 14px; font-weight: 500; }
.rtup-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 14px; }
.rtup { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); color: var(--ink); transition: border-color .15s ease, background-color .15s ease; }
.rtup:hover { text-decoration: none; border-color: var(--blue); background: #fff; }
.rtup-d { display: grid; justify-items: center; gap: 2px; padding: 7px 0; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.rtup-d small { font: 700 10.5px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.rtup-d b { font: 800 21px/1 var(--head); }
.rtup-t { display: grid; gap: 3px; min-width: 0; }
.rtup-t b { font: 700 15px/1.3 var(--head); }
.rtup-t span { font-size: 13px; color: var(--ink-3); }
@media (max-width: 640px) { .mx-rtup { margin-top: 12px; padding: 16px; } .rtup-h h2 { font-size: 13px; } }
/* five tabs in the bottom bar: room for "Community" and "Roundtable" */
@media (max-width: 760px) {
  .m-dock a, .m-dock button { padding-inline: 0; font-size: 10.5px; letter-spacing: -.01em; }
}
