/* Profile shell — outer shape for grain profiles (word / lemma /
   form / root / …).

   Phase 1 scope: match the reader's `.rd-body` shape exactly. Same
   grid split, same breakpoint (900px), same 2fr/1fr row split at
   narrow. Sidebar reuses `.rd-panel*` classes verbatim from panel.css
   so the collapse handle + drawer feel are identical to the reader
   panel. */

.pf-frame {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.pf-frame-nav {
  flex: 0 0 auto;
  /* Owner (word / lemma / …) styles the nav's interior via its own
     scope-bar rules — the shell just provides the row slot. */
}

/* The GLOBAL lens rail — one band spanning main + sidebar
   (Scott, 2026-09-14: the lenses apply everywhere). Same chip
   language as the reader/explorer rails; full-bleed hairline
   below marks it as chrome, not content. */
.pf-frame-rail {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-bottom: 1px solid var(--rd-rule, var(--wb-rule));
}
/* Inside the band, .sv-rail's OWN hairline (inset by the band's
   padding — the line that "doesn't touch the ends") and its
   stickiness are the column-rail's affordances, not the band's:
   the band draws the full-bleed rule itself. */
.pf-frame-rail .sv-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 5px;
  position: static;
  border-bottom: none;
  padding: 0;
}
.pf-frame-rail .lens-gap { inline-size: 10px; }

/* Body grid — mirrors `.rd-body` in panel.css. 2-col at wide, 2fr/1fr
   rows at narrow. */
.pf-frame-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  min-height: 0;
  overflow: hidden;
}
.pf-frame-body.pf-frame-body--sidebar-collapsed {
  grid-template-columns: 1fr 10px;
}
@media (max-width: 900px) {
  .pf-frame-body {
    grid-template-columns: 1fr;
    grid-template-rows: 2fr 1fr;
  }
  .pf-frame-body.pf-frame-body--sidebar-collapsed {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 10px;
  }
}

.pf-frame-main {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  color: var(--rd-ink);
}

/* The `.rd-spine`'s bottom border already provides the horizontal
   line under the spine; the `.rd-panel`'s left border provides the
   vertical line between main and sidebar. Both come from the shared
   `.rd-*` classes so we don't re-declare them here. */

/* Sidebar reuses `.rd-panel` styles from panel.css — the collapse
   handle, `.rd-panel-body`, all the reader panel's visual language
   comes for free. The class stack on the sidebar is
   `.rd-panel .pf-frame-sidebar` so any profile-specific overrides
   can hang here without touching reader styles. */
.pf-frame-sidebar {
  /* No properties needed — everything cascades from `.rd-panel`. */
}

/* ── Verse profile inside the frame (VP10, 2026-07-30) ─────────
   The verse page keeps its own main-column rules (.wb-profile-main:
   padding, centering, the hero bleeds) — the frame's main cell
   steps back to a bare scroller so the two don't double up. */
.wb-profile--scope-top .pf-frame-main {
  padding: 0;
}
.wb-profile--scope-top .pf-frame-main > .wb-profile-main {
  /* the frame's main cell is the scroller */
  overflow-y: visible;
  min-height: 100%;
}
/* Gripper rides the TOP of the sidebar seam in the profile frame
   (Scott, 2026-07-30) — its top aligns with the lens chip row on
   the main side (chips sit ~21px under the frame body). Behavior
   untouched; the reader panel keeps its viewport-center handle. */
.pf-frame-sidebar .rd-panel-collapse-rail {
  top: 24px;
}
/* The verse aside was 400px in the hand-rolled layout; keep that
   width in the frame (collapsed state keeps the shared 10px). */
.wb-profile--scope-top .pf-frame-body:not(.pf-frame-body--sidebar-collapsed) {
  grid-template-columns: 1fr 400px;
}
@media (max-width: 900px) {
  .wb-profile--scope-top .pf-frame-body:not(.pf-frame-body--sidebar-collapsed) {
    grid-template-columns: 1fr;
  }
}
