/* =====================================================================
   nav-preview: five Articles-menu options on one shared chrome.
   Pages are generated by scripts/build-nav-previews.mjs; edit that, not the HTML.

   The first level is the site's own dropdown (.wt-subnav__dd, styled by
   cdo-watchtower.css, wired by cdo-watchtower.js). Everything here is the
   second level, and it reuses the parent menu's surface, rule, radius, shadow
   and padding rather than inventing a second style. No new colour pair enters
   the system: ink is --wt-ink, hover fill is --wt-chip-bg, both already shipped
   pairs (light 11.8:1, dark 13.6:1 measured).
   ===================================================================== */

/* The label+caret dropdown (.np-dd), the mega-refined panel, the item
   megas, and the condensed-bar system moved to /assets/css/kc-nav.css
   (the LIVE site-wide header owns them; previews load that file first). */

/* =====================================================================
   OPTION 1: the flyout, fixed.

   What was broken: .np-fly sat at left: calc(100% + 5px), a 5px DEAD GAP that
   belongs to no element, and the hover bridge only spanned the section ROW
   (~36px) while the flyout is ~250px tall. Moving diagonally toward a lower
   item left the row, crossed the gap, hit nothing, and the parent's CSS :hover
   went false, so the ENTIRE dropdown vanished mid-travel.

   The fix is three things:
   1. left: 100% with NO gap, so leaving the row lands directly on the flyout,
      which is a descendant of the dropdown and therefore keeps :hover true.
   2. the bridge spans the flyout's full height, not the row's.
   3. a close delay in JS, so a brief overshoot does not shut it.
   ===================================================================== */
.np-menu { min-width: 236px; padding: 8px; }
.np-sec { position: relative; }

.np-sec__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; padding: 9px 12px; border-radius: 7px;
  font: 500 14px var(--wt-font-ui); color: var(--wt-ink);
  background: none; border: 0; cursor: pointer;
  text-align: left; white-space: nowrap; letter-spacing: normal;
}
.np-sec__btn:hover, .np-sec.is-open > .np-sec__btn { background: var(--wt-chip-bg); }
.np-sec__btn:focus-visible { outline: 3px solid var(--kc-focus, var(--wt-accent)); outline-offset: -2px; }
.np-sec__arrow { width: 10px; height: 10px; flex: 0 0 auto; opacity: .75; transition: transform 140ms ease, opacity 140ms ease; }
.np-sec.is-open > .np-sec__btn .np-sec__arrow { opacity: 1; transform: translateX(2px); }

.np-fly {
  position: absolute; left: 100%; top: -8px;   /* NO GAP: the 5px is what broke it */
  min-width: 218px;
  background: var(--wt-surface);
  border: 1px solid var(--wt-rule);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(40, 58, 49, .14);
  padding: 8px;
  margin-left: 6px;            /* visual breathing room ONLY. Margin is outside the
                                  border box and is NOT hit-testable, so this strip
                                  is dead on its own; the ::before below covers it. */
  display: none; z-index: 61;
}
.np-sec.is-open > .np-fly { display: block; }
.np-sec.is-flipped > .np-fly { left: auto; right: 100%; margin-left: 0; margin-right: 6px; }

/* the bridge: covers the margin strip for the WHOLE height of the flyout, so a
   diagonal move to the last item never crosses dead space */
.np-sec.is-open > .np-fly::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: -8px; width: 8px;
}
.np-sec.is-flipped.is-open > .np-fly::before { left: auto; right: -8px; }

.np-fly a, .np-one, .np-mega__col a, .np-panel__pane a {
  display: block; padding: 9px 12px; border-radius: 7px;
  font: 500 14px var(--wt-font-ui); color: var(--wt-ink);
  text-decoration: none; white-space: nowrap; letter-spacing: normal;
}
.np-fly a:hover, .np-one:hover, .np-mega__col a:hover, .np-panel__pane a:hover { background: var(--wt-chip-bg); }
.np-fly a:focus-visible, .np-one:focus-visible, .np-mega__col a:focus-visible, .np-panel__pane a:focus-visible {
  outline: 3px solid var(--kc-focus, var(--wt-accent)); outline-offset: -2px;
}

/* =====================================================================
   OPTION 2: one level. Four destinations, no second tier, nothing to miss.
   ===================================================================== */
.np-menu--simple { min-width: 268px; }
.np-one { white-space: normal; }
.np-one span { display: block; font-weight: 600; }
.np-one small { display: block; font: 400 12.5px var(--wt-font-ui); color: var(--wt-ink-quiet, var(--wt-ink-soft)); margin-top: 1px; }

/* =====================================================================
   OPTION 3: mega. Everything visible at once, so there is no second-tier
   hover to land on at all. This is the pattern that deletes the problem.
   ===================================================================== */
.np-menu--mega { min-width: 0; width: min(920px, calc(100vw - 48px)); padding: 18px; }
.np-mega { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 14px; }
.np-mega__col { min-width: 0; }
.np-mega__hd {
  display: block; padding: 6px 12px 8px;
  font: 700 11px var(--wt-font-ui); letter-spacing: .09em; text-transform: uppercase;
  color: var(--wt-accent); text-decoration: none;
}
a.np-mega__hd:hover { text-decoration: underline; }
/* column-group headers that are PLAIN TEXT (LISTEN/BROWSE/…, and the option-11
   News categories): no landing page, so they are <span>, not links. */
.np-mega__hd--label { cursor: default; }
.np-mega__col a { white-space: normal; }
.np-mega__foot { grid-column: 1 / -1; border-top: 1px solid var(--wt-rule); margin-top: 8px; padding-top: 10px; }
.np-mega__all { font: 600 13.5px var(--wt-font-ui); color: var(--wt-accent); text-decoration: none; padding: 0 12px; }
.np-mega__all:hover { text-decoration: underline; }
@media (max-width: 900px) { .np-mega { grid-template-columns: repeat(2, 1fr); } }

/* =====================================================================
   OPTION 4: two-column panel. The flyout feel with no dead zone, because
   both columns are inside ONE box: there is nothing to fall through.
   ===================================================================== */
.np-menu--panel { min-width: 0; width: min(560px, calc(100vw - 48px)); padding: 8px; }
.np-panel { display: grid; grid-template-columns: 200px 1fr; gap: 8px; }
.np-panel__left { border-right: 1px solid var(--wt-rule); padding-right: 8px; }
.np-panel__tab {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 9px 12px; border-radius: 7px; margin-bottom: 2px;
  font: 500 14px var(--wt-font-ui); color: var(--wt-ink);
  background: none; border: 0; cursor: pointer; text-align: left; white-space: nowrap;
}
.np-panel__tab:hover, .np-panel__tab.is-on { background: var(--wt-chip-bg); }
.np-panel__tab.is-on { font-weight: 700; }
.np-panel__tab:focus-visible { outline: 3px solid var(--kc-focus, var(--wt-accent)); outline-offset: -2px; }
.np-panel__pane { display: none; }
.np-panel__pane.is-on { display: block; }
.np-panel__pane a { white-space: normal; }
@media (max-width: 700px) { .np-panel { grid-template-columns: 1fr; } .np-panel__left { border-right: 0; border-bottom: 1px solid var(--wt-rule); padding: 0 0 8px; } }

/* ---------- mobile: no sideways room, so the flyout drops in underneath ---------- */
@media (max-width: 700px) {
  .np-fly {
    position: static; display: none; min-width: 0; margin: 2px 0 6px 12px;
    border: 0; border-left: 2px solid var(--wt-rule); box-shadow: none;
    padding: 2px 0 6px 12px; background: none;
  }
  .np-sec.is-open > .np-fly { display: block; }
  .np-sec.is-open > .np-fly::before { display: none; }
  .np-menu--mega, .np-menu--panel { width: calc(100vw - 32px); }
}
@media (prefers-reduced-motion: reduce) { .np-sec__arrow { transition: none; } }

/* =====================================================================
   the preview pages themselves (not part of any nav)
   ===================================================================== */
.np-main { padding: 30px 0 40px; }
.np-body--articles .np-main { max-width: none; }
.np-eyebrow { font: 700 11px var(--wt-font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--wt-accent); margin: 0 0 6px; }
.np-eyebrow a { color: inherit; }
.np-lede { font-size: 17px; line-height: 1.6; color: var(--wt-ink-soft, var(--wt-ink)); max-width: 720px; }
.np-note { background: var(--wt-chip-bg); border: 1px solid var(--wt-rule); border-radius: 12px; padding: 16px 20px; margin: 22px 0; max-width: 720px; }
.np-note p { margin: 6px 0; line-height: 1.55; }
.np-try { max-width: 720px; line-height: 1.6; }
.np-foot { margin-top: 30px; color: var(--wt-ink-quiet, var(--wt-ink-soft)); font: 500 14px var(--wt-font-ui); }
.np-spacer { min-height: 85vh; display: flex; justify-content: center; padding-top: 40px; }
.np-spacer p { color: var(--wt-ink-quiet, var(--wt-ink-soft)); font: 500 14px var(--wt-font-ui); }

.np-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.np-switch a {
  font: 600 13px var(--wt-font-ui); text-decoration: none; color: var(--wt-ink);
  background: var(--wt-chip-bg); border: 1px solid var(--wt-rule);
  padding: 8px 14px; border-radius: 999px;
}
.np-switch a:hover { border-color: var(--wt-ink-soft); }
.np-switch a[aria-current="page"] { background: var(--wt-btn-bg); color: var(--wt-btn-ink); border-color: var(--wt-btn-bg); }

.np-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 26px 0; }
.np-card {
  display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: var(--wt-ink);
  background: var(--wt-surface); border: 1px solid var(--wt-rule); border-radius: 14px; padding: 20px;
  transition: border-color 140ms ease, transform 140ms ease;
}
.np-card:hover { border-color: var(--wt-ink-soft); transform: translateY(-2px); }
.np-card:focus-visible { outline: 3px solid var(--kc-focus, var(--wt-accent)); outline-offset: 2px; }
.np-card__n { font: 700 11px var(--wt-font-ui); letter-spacing: .1em; color: var(--wt-accent); }
.np-card__name { font: 700 19px var(--wt-font-display, var(--wt-font-ui)); }
.np-card__tag { font: 600 12.5px var(--wt-font-ui); color: var(--wt-ink-quiet, var(--wt-ink-soft)); margin-bottom: 4px; }
.np-card__what { font-size: 14.5px; line-height: 1.5; margin-bottom: 6px; }
.np-card__row { font-size: 13px; line-height: 1.45; }
.np-card__row--good strong { color: var(--wt-accent); }
@media (prefers-reduced-motion: reduce) { .np-card { transition: none; } .np-card:hover { transform: none; } }

/* ---------- the articles hub ---------- */
.hub-group { margin: 38px 0; scroll-margin-top: 110px; }
.hub-group__h { font: 700 26px var(--wt-font-display, var(--wt-font-ui)); margin: 0 0 2px; }
.hub-group__blurb { color: var(--wt-ink-quiet, var(--wt-ink-soft)); margin: 0 0 16px; }
.hub-secs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.hub-sec { border-top: 2px solid var(--wt-rule); padding-top: 12px; min-width: 0; }
.hub-sec__h { display: block; font: 700 15px var(--wt-font-ui); color: var(--wt-ink); text-decoration: none; margin-bottom: 8px; }
.hub-sec__h:hover { color: var(--wt-accent); }
.hub-sec__list { list-style: none; margin: 0 0 10px; padding: 0; }
.hub-sec__list li { margin: 0 0 7px; }
.hub-sec__list a { font: 500 13.5px/1.4 var(--wt-font-ui); color: var(--wt-ink-soft, var(--wt-ink)); text-decoration: none; }
.hub-sec__list a:hover { color: var(--wt-accent); text-decoration: underline; }
.hub-sec__all { font: 600 12.5px var(--wt-font-ui); color: var(--wt-accent); text-decoration: none; }
.hub-sec__all:hover { text-decoration: underline; }
.hub-group__h a { color: inherit; text-decoration: none; }
.hub-group__h a:hover { color: var(--wt-accent); }
.hub-group__n { font: 600 12.5px var(--wt-font-ui); color: var(--wt-accent); }

/* =====================================================================
   OPTIONS 6-10: the visual mega menus.

   Every featured card is SERVER-RENDERED with a real image, kicker and headline
   (build-nav-previews.mjs featCard). It is never a blank box: nav-preview.js only
   overrides it to today's pick. All type/link/button colours here are re-asserted
   with enough specificity to beat the site's `.wt-subnav__menu a { color: inherit }`
   rule, which is what turned the Donate button black-on-green (2.37:1) before.
   Colours are the shipped site pairs, so contrast is known: ink --wt-ink 11.8:1
   light / 13.6:1 dark; button --wt-btn-ink on --wt-btn-bg 7.0:1 / 11.4:1.
   ===================================================================== */

/* ---- shared: the daily-context header (tells people it rotates) ---- */
.np-fhead { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.np-fhead__t {
  font: 700 11px var(--wt-font-ui); letter-spacing: .09em; text-transform: uppercase;
  color: var(--wt-ink-quiet, var(--wt-ink-soft));
}
.np-fhead__tag {
  font: 700 9.5px var(--wt-font-ui); letter-spacing: .06em; text-transform: uppercase;
  color: var(--wt-accent); background: var(--wt-chip-bg);
  border: 1px solid var(--wt-rule); border-radius: 999px; padding: 2px 9px;
}

/* ---- shared: a featured story card ---- */
.np-menu a.np-fc { display: block; text-decoration: none; border-radius: 12px; overflow: hidden; }
.np-fc__img {
  display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 12px;
  background: var(--wt-chip-bg) center / cover no-repeat;   /* chip bg only shows for the instant before paint */
}
.np-fc__body { display: block; padding: 10px 2px 2px; }
.np-menu a.np-fc .np-fc__kicker {
  display: block; white-space: normal;
  font: 700 10px var(--wt-font-ui); letter-spacing: .08em; text-transform: uppercase;
  color: var(--wt-accent); margin-bottom: 3px;
}
.np-menu a.np-fc .np-fc__h {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: normal; font: 700 14px/1.32 var(--wt-font-ui); color: var(--wt-ink);
}
.np-menu a.np-fc .np-fc__dek {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: normal; font: 400 12.5px/1.45 var(--wt-font-ui);
  color: var(--wt-ink-quiet, var(--wt-ink-soft)); margin-top: 5px;
}
.np-fc:hover .np-fc__h { color: var(--wt-accent); }
.np-fc:hover .np-fc__img { filter: brightness(1.04); }
.np-fc:focus-visible { outline: 3px solid var(--kc-focus, var(--wt-accent)); outline-offset: 3px; }
.np-fc__img, .np-fc__h { transition: filter 160ms ease, color 160ms ease; }
/* the tall variant clamps the headline to 3 so section rules below align */
.np-fc--tall .np-fc__h { -webkit-line-clamp: 3; min-height: 3.96em; }

/* ---- shared: section links used inside the visual megas ---- */
.np-menu a.np-m7__lnk {
  display: block; padding: 6px 8px; margin-left: -8px; border-radius: 6px; white-space: normal;
  font: 500 13.5px var(--wt-font-ui); color: var(--wt-ink); text-decoration: none;
}
.np-menu a.np-m7__lnk:hover { background: var(--wt-chip-bg); color: var(--wt-ink); }
.np-menu a.np-m7__lnk:focus-visible { outline: 3px solid var(--kc-focus, var(--wt-accent)); outline-offset: -2px; }

/* 6. columns + one wide featured story on the right */
.np-menu--m6 { min-width: 0; width: min(1040px, calc(100vw - 48px)); padding: 20px; }
.np-m6 { display: grid; grid-template-columns: 1fr 288px; gap: 26px; }
.np-m6__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 16px; }
.np-m6__feat { border-left: 1px solid var(--wt-rule); padding-left: 24px; }
.np-menu--m6 .np-fc--wide .np-fc__img { aspect-ratio: 16 / 9; }
.np-menu a.np-m6__all { display: inline-block; margin-top: 14px; white-space: normal;
  font: 600 13px var(--wt-font-ui); color: var(--wt-accent); text-decoration: none; }
.np-m6__all:hover { text-decoration: underline; }

/* 7. a daily story per section (Kaʻo's idea) */
.np-menu--m7 { min-width: 0; width: min(1080px, calc(100vw - 48px)); padding: 20px; }
.np-m7__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.np-m7__col { min-width: 0; }
.np-m7__col .np-fc { margin-bottom: 12px; }
.np-menu a.np-m7__hd {
  display: block; padding: 9px 0 7px; margin-bottom: 2px; border-top: 1px solid var(--wt-rule);
  white-space: normal; font: 700 11px var(--wt-font-ui); letter-spacing: .09em;
  text-transform: uppercase; color: var(--wt-accent); text-decoration: none;
}
.np-m7__hd:hover { text-decoration: underline; }

/* 8. the clean grid, plus an honest ask. Button re-asserts its own ink/bg with
   .np-menu specificity so the menu-link inherit rule cannot black it out. */
.np-menu--m8 { min-width: 0; width: min(940px, calc(100vw - 48px)); padding: 20px; }
.np-m8__ask {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: 16px; padding: 16px 20px; border-radius: 14px;
  background: var(--wt-chip-bg); border: 1px solid var(--wt-rule);
}
.np-m8__h { margin: 0; white-space: normal; font: 700 15px var(--wt-font-ui); color: var(--wt-ink); }
.np-m8__sub { margin: 4px 0 0; white-space: normal; font: 400 12.5px/1.45 var(--wt-font-ui); color: var(--wt-ink-quiet, var(--wt-ink-soft)); }
.np-menu a.np-m8__btn {
  flex: 0 0 auto; white-space: nowrap; text-decoration: none;
  background: var(--wt-btn-bg); color: var(--wt-btn-ink);
  font: 700 14px var(--wt-font-ui); padding: 12px 28px; border-radius: 999px;
}
.np-menu a.np-m8__btn:hover { background: var(--wt-btn-bg-hover); color: var(--wt-btn-ink); }
.np-menu a.np-m8__btn:focus-visible { outline: 3px solid var(--kc-focus, var(--wt-accent)); outline-offset: 2px; }

/* 9. image-led: a featured story card per category, sections beneath */
.np-menu--m9 { min-width: 0; width: min(1080px, calc(100vw - 48px)); padding: 20px; }
.np-m9__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.np-m9__col { min-width: 0; }
.np-m9__col .np-fc { margin-bottom: 10px; }
.np-menu a.np-m9__name {
  display: block; padding: 8px 0 6px; margin-bottom: 2px; border-top: 1px solid var(--wt-rule);
  white-space: normal; font: 700 15px var(--wt-font-display, var(--wt-font-ui));
  color: var(--wt-ink); text-decoration: none;
}
.np-m9__name:hover { color: var(--wt-accent); }
.np-m9__links { display: flex; flex-direction: column; }

/* 10. editorial: category rail left, three real stories right */
.np-menu--m10 { min-width: 0; width: min(1000px, calc(100vw - 48px)); padding: 20px; }
.np-m10 { display: grid; grid-template-columns: 236px 1fr; gap: 26px; }
.np-m10__rail { border-right: 1px solid var(--wt-rule); padding-right: 22px; }
.np-m10__eyebrow { font: 700 10.5px var(--wt-font-ui); letter-spacing: .09em; text-transform: uppercase;
  color: var(--wt-ink-quiet, var(--wt-ink-soft)); margin: 0 0 10px; }
.np-menu a.np-m10__cat { display: block; padding: 9px 10px; margin-left: -10px; border-radius: 8px; text-decoration: none; white-space: normal; }
.np-m10__cat span { display: block; font: 700 14px var(--wt-font-ui); color: var(--wt-ink); }
.np-m10__cat small { display: block; font: 400 12px var(--wt-font-ui); color: var(--wt-ink-quiet, var(--wt-ink-soft)); }
.np-m10__cat:hover { background: var(--wt-chip-bg); }
.np-m10__cat:hover span { color: var(--wt-accent); }
.np-m10__cat:focus-visible { outline: 3px solid var(--kc-focus, var(--wt-accent)); outline-offset: -2px; }
.np-menu a.np-m10__all { display: inline-block; margin-top: 10px; white-space: normal;
  font: 600 13px var(--wt-font-ui); color: var(--wt-accent); text-decoration: none; }
.np-m10__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.np-menu a.np-m10__ask {
  display: block; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--wt-rule);
  white-space: normal; font: 400 13px var(--wt-font-ui);
  color: var(--wt-ink-quiet, var(--wt-ink-soft)); text-decoration: none;
}
.np-m10__ask strong { color: var(--wt-accent); }
.np-m10__ask:hover strong { text-decoration: underline; }

@media (max-width: 1040px) {
  .np-m6 { grid-template-columns: 1fr; }
  .np-m6__feat { border-left: 0; border-top: 1px solid var(--wt-rule); padding: 16px 0 0; }
  .np-m7__grid, .np-m9__grid { grid-template-columns: repeat(2, 1fr); }
  .np-m10 { grid-template-columns: 1fr; }
  .np-m10__rail { border-right: 0; border-bottom: 1px solid var(--wt-rule); padding: 0 0 14px; }
}
@media (max-width: 700px) {
  .np-m7__grid, .np-m9__grid, .np-m10__grid { grid-template-columns: 1fr; }
  .np-m8__ask { flex-direction: column; align-items: flex-start; }
  .np-menu--m6, .np-menu--m7, .np-menu--m8, .np-menu--m9, .np-menu--m10 { width: calc(100vw - 32px); }
}


/* the index: ten simple links, one short description each (Kaʻo: "5 simple
   links with a short description each"). The old card grid was a wall of text. */
.np-list { list-style: none; margin: 26px 0; padding: 0; max-width: 720px; }
.np-list li { border-bottom: 1px solid var(--wt-rule); }
.np-list a {
  display: grid; grid-template-columns: 30px 190px 1fr; align-items: baseline; gap: 4px 14px;
  padding: 14px 10px; margin-left: -10px; border-radius: 8px; text-decoration: none;
}
.np-list a:hover { background: var(--wt-chip-bg); }
.np-list a:focus-visible { outline: 3px solid var(--kc-focus, var(--wt-accent)); outline-offset: -2px; }
.np-list__n { font: 700 13px var(--wt-font-ui); color: var(--wt-accent); }
.np-list__name { font: 700 15.5px var(--wt-font-ui); color: var(--wt-ink); }
.np-list__desc { font: 400 14px/1.45 var(--wt-font-ui); color: var(--wt-ink-quiet, var(--wt-ink-soft)); }
.np-list a:hover .np-list__name { color: var(--wt-accent); }
@media (max-width: 620px) {
  .np-list a { grid-template-columns: 26px 1fr; }
  .np-list__desc { grid-column: 2; }
}
