/* ============================================================
   nav-drawer.css  —  Zodianimal.com mobile accordion drawer
   ------------------------------------------------------------
   Phase 3. Below the bar breakpoint the .pn-burger opens a
   full-height drawer. The seven groups stack as an accordion; each
   group header is a <button aria-expanded> disclosure that reveals
   that group's rows (glyph + serif name + muted sub) as an
   edge-to-edge stacked list. Same card-free language as the desktop
   panels: hairlines and type, never boxes.

   Markup nav.js hydrates into (built from the pre-rendered panels):
     .pn-drawer[role=dialog][aria-modal]        (backdrop + top layer)
       .pn-drawer-sheet
         .pn-drawer-top ( .pn-drawer-brand + button.pn-drawer-close )
         .pn-acc
           .pn-acc-group[data-accent]
             button.pn-acc-head[aria-expanded]  ( label + .pn-acc-chev )
             .pn-acc-body   ( cloned a.pn-row rows )

   All tokens from tokens.css. No hard-coded hex. No arrows or dashes
   in content strings. 44px minimum touch targets throughout.
   ============================================================ */

/* ------------------------------------------------------------
   1. Backdrop. Fixed, dim, blurred. Only shown when .open.
   ------------------------------------------------------------ */
.pn-drawer {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: none;
  background: oklch(0.10 0.02 275 / 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.pn-drawer.open { display: block; }

/* ------------------------------------------------------------
   2. The sheet. Slides from the right, full height, scrollable.
   ------------------------------------------------------------ */
.pn-drawer-sheet {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 90vw);
  background: linear-gradient(180deg, var(--panel), var(--ink));
  border-left: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: var(--s-4) var(--s-4) var(--s-8);
  box-shadow: var(--e-3);
}

/* ------------------------------------------------------------
   3. Top row: brand + close. Close is a real 44px button.
   ------------------------------------------------------------ */
.pn-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: var(--s-2) var(--s-4);
  margin-bottom: var(--s-2);
  border-bottom: 1px solid var(--line);
}
.pn-drawer-brand {
  font: 500 var(--fs-h3, 1.3rem)/1 var(--serif);
  letter-spacing: .5px;
  color: var(--moon);
  text-decoration: none;
}
.pn-drawer-brand b { color: var(--brass); font-weight: 500; }

.pn-drawer-close {
  appearance: none;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--s-4);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--moon);
  font: 500 .82rem/1 var(--sans);
  transition: border-color var(--dur-fast) var(--ease-io),
              color var(--dur-fast) var(--ease-io);
}
.pn-drawer-close:hover { border-color: var(--brass); color: var(--brass-bright); }
.pn-drawer-close:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 2px; }

/* ------------------------------------------------------------
   4. Accordion group. Per-group accent scoping mirrors the desktop
   panels, so each domain glows its own hue in the drawer too.
   ------------------------------------------------------------ */
.pn-acc-group { border-bottom: 1px solid var(--line); }

.pn-acc-group[data-accent="jade"]     { --accent: var(--jade);     --accent-bright: var(--jade-bright); }
.pn-acc-group[data-accent="silver"]   { --accent: var(--silver);   --accent-bright: var(--silver-bright); }
.pn-acc-group[data-accent="amethyst"] { --accent: var(--amethyst); --accent-bright: var(--amethyst-bright); }
.pn-acc-group[data-accent="rose"]     { --accent: var(--rose);     --accent-bright: var(--rose-bright); }
.pn-acc-group[data-accent="teal"]     { --accent: var(--teal);     --accent-bright: var(--teal-bright); }
.pn-acc-group[data-accent="brass"]    { --accent: var(--brass);    --accent-bright: var(--brass-bright); }

/* ------------------------------------------------------------
   5. Group header (disclosure button). Full-width, 44px+, serif.
   ------------------------------------------------------------ */
.pn-acc-head {
  appearance: none;
  cursor: pointer;
  width: 100%;
  min-height: 52px;
  background: transparent;
  border: none;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-1);
  font: 500 var(--fs-h3, 1.2rem)/1.15 var(--serif);
  color: var(--moon);
  transition: color var(--dur-fast) var(--ease-io);
}
.pn-acc-head:hover { color: var(--accent-bright); }
.pn-acc-head:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 2px; border-radius: var(--r-1); }
.pn-acc-head[aria-expanded="true"] { color: var(--accent-bright); }

/* the chevron: a css caret, no arrow glyph in content */
.pn-acc-chev {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .7;
  transition: transform var(--dur-fast) var(--ease-io);
}
.pn-acc-head[aria-expanded="true"] .pn-acc-chev { transform: rotate(-135deg) translateY(2px); }

/* ------------------------------------------------------------
   6. Accordion body. Collapsed by default; nav.js toggles .open on
   the group. Rows are the same .pn-row as desktop, edge to edge.
   ------------------------------------------------------------ */
.pn-acc-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--dur) var(--ease-io);
}
.pn-acc-group.open .pn-acc-body { max-height: 200vh; }

.pn-acc-body .pn-eyebrow-sub {
  font: 400 .8rem/1.45 var(--sans);
  color: var(--muted);
  padding: 0 var(--s-1) var(--s-3);
  margin: 0;
}

/* rows inside the drawer: edge to edge, hairline separated, 44px+ */
.pn-acc-body .pn-row {
  margin-inline: 0;
  padding: var(--s-3) var(--s-2);
  min-height: 48px;
  border-bottom: 1px solid var(--line-soft);
}
.pn-acc-body .pn-row:last-child { border-bottom: 0; }

/* the drawer foot link reuses .pn-panel-foot styling but block width */
.pn-acc-body .pn-panel-foot {
  margin-top: var(--s-3);
  min-height: 48px;
}

/* cloned chip strip: drop the desktop panel measure inside the sheet,
   and grow the chips to comfortable touch targets */
.pn-acc-body .pn-chips {
  max-width: none;
  margin: var(--s-3) 0 var(--s-2);
  padding-inline: 0;
}
.pn-acc-body .pn-chip { width: 40px; height: 40px; }

/* cloned feature aside (Fire Horse / Today) + e-book card: reset the
   desktop measure and tame the big watermark for the narrow sheet, and
   give the links 44px targets. Same card-free language, block width. */
.pn-acc-body .pn-feature {
  margin: var(--s-3) 0 var(--s-2);
  padding: var(--s-3) var(--s-4) var(--s-4);
}
.pn-acc-body .pn-feature-cal { font-size: 80px; bottom: -18px; right: -4px; }
.pn-acc-body .pn-feature-title { font-size: 1.15rem; }
.pn-acc-body .pn-panel-cta {
  max-width: none;
  margin: var(--s-3) 0 var(--s-2);
  padding-inline: 0;
}
.pn-acc-body .pn-ebook { max-width: none; }

/* single-link groups (How it works) render as a plain row header link */
.pn-acc-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: var(--s-3) var(--s-1);
  font: 500 var(--fs-h3, 1.2rem)/1.15 var(--serif);
  color: var(--moon);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color var(--dur-fast) var(--ease-io);
}
.pn-acc-link:hover { color: var(--brass-bright); }
.pn-acc-link:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 2px; border-radius: var(--r-1); }

/* ------------------------------------------------------------
   6b. "This section" group. nav.js clones the current page's sibling
   sub-nav (the sticky horizontal scroller) into a drawer accordion so
   small screens can jump between siblings vertically. Parents that have
   a .pn-subdrop get their children rendered INLINE, full-width, indented
   one step — no popover on touch. Open by default (nav.js sets .open +
   aria-expanded=true). Same hairline-and-type language, 44px+ targets,
   and it never introduces a horizontal scroll box.
   ------------------------------------------------------------ */
.pn-acc-section { --accent: var(--brass); --accent-bright: var(--brass-bright); }

.pn-acc-sublink {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: var(--s-3) var(--s-2);
  font: 400 1rem/1.3 var(--serif);
  color: var(--moon);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
  transition: color var(--dur-fast) var(--ease-io);
  /* no fixed width / white-space:nowrap => wraps instead of scrolling */
  word-break: break-word;
}
.pn-acc-sublink:last-child { border-bottom: 0; }
.pn-acc-sublink:hover { color: var(--accent-bright); }
.pn-acc-sublink:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: -2px;
  border-radius: var(--r-1);
}
/* the current sibling reads brighter + italic (meaning is never color-only) */
.pn-acc-sublink[aria-current="page"] {
  color: var(--ivory);
  font-style: italic;
  font-weight: 500;
}

/* child of a .pn-subdrop parent: indented one step, quieter, smaller */
.pn-acc-subchild {
  padding-left: var(--s-5, 1.5rem);
  font-size: .92rem;
  color: var(--muted);
}
.pn-acc-subchild::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  margin-right: var(--s-2);
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
}
.pn-acc-subchild:hover { color: var(--accent-bright); }
.pn-acc-subchild[aria-current="page"] { color: var(--ivory); font-style: italic; }

/* ------------------------------------------------------------
   7. Motion. Sheet slides in; gated behind no-preference. Reduced
   motion: the sheet and accordion appear instantly.
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .pn-drawer.open .pn-drawer-sheet {
    animation: pnDrawerIn var(--dur) var(--ease-out) both;
  }
  @keyframes pnDrawerIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .pn-drawer.open .pn-drawer-sheet { animation: none; }
  .pn-acc-body { transition: none; }
  .pn-acc-chev,
  .pn-acc-head,
  .pn-acc-link,
  .pn-acc-sublink,
  .pn-acc-subchild,
  .pn-drawer-close { transition: none; }
}

/* the drawer only ever exists below the bar breakpoint */
@media (min-width: 901px) {
  .pn-drawer { display: none !important; }
}
