/* Shared styles for the Explore Nepal pages (explore.html, explore-*.html) --
   one file so the seven pages the sub-nav moves between keep identical
   chrome, in the same spirit as site-header.css being shared instead of
   copied into each page's own <style> block (unlike news.html/seasons.html,
   which do still duplicate their layout CSS -- this one file is linked by
   seven pages, not one, so the duplication cost is seven times higher and
   worth avoiding). Each page still declares its own @font-face/:root block,
   since that part really is identical across every standalone page here. */
.wrap{max-width:1180px;margin:0 auto;padding:16px 20px 60px}
.topbar{margin-bottom:18px;background:var(--ink-2);border:1px solid var(--line);border-radius:2px;
  padding:14px 20px;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.masthead h1{font-size:25px}
.sub{color:var(--paper-dim);font-size:14px;margin:8px 0 0;max-width:68ch}

/* Sub-nav between the seven Explore pages: plain links to separate pages
   (a real navigation, not an anchor scroll or a client-side tab switch),
   so it behaves exactly like following any other link on the site --
   predictable on any device, and the active page is marked the same way
   site-header.js already marks the current top-level page. */
.sectionNav{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px;
  background:var(--ink-2);border:1px solid var(--line);border-radius:2px;padding:10px;
  box-shadow:0 1px 3px rgba(0,0,0,.08)}
.navPill{background:var(--ink-3);border:1px solid var(--line);color:var(--paper-2);text-decoration:none;
  font:inherit;font-size:13px;padding:7px 13px;border-radius:3px;cursor:pointer;
  transition:filter .15s var(--ease),transform .15s var(--ease)}
.navPill:hover{filter:brightness(1.2)}
.navPill[aria-current="page"]{background:var(--orpiment);color:var(--ink);border-color:var(--orpiment);font-weight:600}

.module{border:1px solid var(--line);border-radius:2px;padding:20px 22px;margin-bottom:22px;background:var(--ink-2);
  box-shadow:0 1px 3px rgba(0,0,0,.08)}
.module h2{font-size:19px;margin-bottom:6px}
.module-note{font-size:13px;color:var(--paper-dim);margin:0 0 16px;max-width:70ch}

/* Controls: search box + custom-styled <select>, matching the atlas's own
   dark pill inputs rather than default OS widgets. */
.ctrlRow{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px;align-items:center}
.searchInput{background:var(--ink);border:1px solid var(--line);color:var(--paper);font:inherit;font-size:13px;
  padding:8px 11px 8px 30px;border-radius:10px;min-width:200px;flex:1 1 220px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' width='13' height='13'%3E%3Ccircle cx='8.5' cy='8.5' r='6' fill='none' stroke='%238C8CAA' stroke-width='1.6'/%3E%3Cpath d='M13 13l4.5 4.5' stroke='%238C8CAA' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:9px center}
.searchInput:focus{outline:2px solid var(--orpiment);outline-offset:1px}
.selectCtl{appearance:none;-webkit-appearance:none;background:var(--ink-3);border:1px solid var(--line);color:var(--paper);
  font:inherit;font-size:13px;padding:8px 30px 8px 12px;border-radius:10px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' width='12' height='12'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%238C8CAA' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center}
.selectCtl:focus{outline:2px solid var(--orpiment);outline-offset:1px}
.filterPill{background:var(--ink-3);border:1px solid var(--line);color:var(--paper-2);
  font:inherit;font-size:12.5px;padding:7px 13px;border-radius:3px;cursor:pointer;
  transition:filter .15s var(--ease)}
.filterPill:hover{filter:brightness(1.2)}
.filterPill[aria-pressed="true"]{background:var(--orpiment);color:var(--ink);border-color:var(--orpiment);font-weight:600}

/* Card grids: image-forward, for Personalities/Heritage/Culture. */
.cardGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.card{border:1px solid var(--line);border-radius:2px;background:var(--ink-3);overflow:hidden;display:flex;flex-direction:column}
.card .thumb{width:100%;aspect-ratio:4/3;object-fit:cover;background:var(--ink);display:block}
/* Missing/broken-image fallback -- same component and class names as
   index.template.html's own copy (kept in sync by hand, like this page's
   other shared rules), shown whenever a card has no image or its image
   404s once in the DOM (see thumbOrPlaceholder() in explore.js). */
.card .imgFallback{width:100%;aspect-ratio:4/3;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:6px;padding:14px;background:var(--ink);text-align:center}
.imgFallback .imgFallbackMark{width:34px;height:34px;border-radius:9px;flex:none;
  background:linear-gradient(145deg,var(--orpiment),#C8932A);display:flex;align-items:center;justify-content:center;
  font-family:"Noto Sans Devanagari",serif;font-size:19px;font-weight:700;color:var(--ink);line-height:1}
.imgFallback .imgFallbackName{font-family:Spectral,Georgia,serif;font-size:13px;font-weight:600;color:var(--paper-2)}
.imgFallback .imgFallbackName .dev{font-family:"Noto Sans Devanagari",Archivo,sans-serif;font-size:11px;color:var(--paper-dim);font-weight:400;margin-left:5px}
body.ne .imgFallback .imgFallbackName{font-family:"Noto Sans Devanagari",Spectral,serif}
body.ne .imgFallback .imgFallbackName .dev{font-family:Spectral,Georgia,serif}
.imgFallback .imgFallbackLabel{font-size:11px;color:var(--paper-dim)}
.card .body{padding:11px 13px;display:flex;flex-direction:column;gap:5px;flex:1}
.card .title{font-size:14.5px;font-weight:600;color:var(--paper);font-family:Archivo,sans-serif}
.card .meta{font-size:12px;color:var(--paper-dim)}
.card .desc{font-size:13px;color:var(--paper-2);margin:0;flex:1}
.card .src{font-size:10.5px;color:var(--paper-dim);margin-top:2px}
.card .credit{font-size:10px;color:var(--paper-dim);opacity:.8}
.bkBtn{align-self:flex-start;margin-top:4px;background:var(--ink);border:1px solid var(--line);color:var(--paper-2);
  font:inherit;font-size:12px;padding:6px 11px;border-radius:3px;cursor:pointer;transition:filter .15s var(--ease)}
.bkBtn:hover{filter:brightness(1.2)}
.bkBtn[aria-pressed="true"]{background:var(--orpiment);color:var(--ink);border-color:var(--orpiment);font-weight:600}
.badge{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;
  background:rgba(110,146,214,.18);color:var(--orpiment);border-radius:5px;padding:2px 6px;align-self:flex-start}

/* On This Day + Routes + Stories + Learn: a simpler text-row list, same
   shape as the main atlas's own .evt rows. */
.evtList{display:flex;flex-direction:column;gap:10px}
.evtRow{border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:var(--ink-3)}
.evtRow time{display:block;font-variant-numeric:tabular-nums;color:var(--paper-dim);font-size:12.5px;margin-bottom:2px}
.evtRow b{font-family:Archivo,sans-serif;font-size:14px}
.evtRow p{margin:4px 0 0;font-size:13.5px;color:var(--paper-2)}
.evtRow .src{font-size:11px;color:var(--paper-dim);margin-top:4px}

#status{color:var(--paper-dim);padding:14px 0}
#status.err{color:var(--madder)}
@media (max-width:760px){
  .wrap{max-width:100%}
  .cardGrid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
}
