/* A small set of paths first; bounded result pages keep browsing easy to follow. */
#page-explore{max-width:1000px;margin-inline:auto;padding-bottom:28px}
#page-explore .explore-heading{padding:28px 0 19px;text-align:start;margin:0}
#page-explore .explore-heading h1{font-size:43px;line-height:1.2;margin:0;letter-spacing:-.7px}
#page-explore .explore-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 20px}
.explore-search{position:relative;min-width:0;flex:1 0 100%}
#page-explore .search-box{width:100%;border-radius:16px;box-shadow:none}
#page-explore .search-box input{padding-inline-end:31px;min-width:0;min-height:52px}
#page-explore .search-box input::-webkit-search-cancel-button{display:none}
.explore-search-clear{position:absolute;inset-inline-end:7px;top:5px;width:44px;height:44px;border:0;border-radius:50%;background:transparent;color:var(--muted);font-size:26px;line-height:1}
.explore-search-clear:hover{background:var(--primary-soft);color:var(--ink)}
#page-explore #typeFilters{flex:1 1 280px;display:flex;gap:4px;padding:4px;width:auto;border:1px solid var(--line);border-radius:14px}
#page-explore #typeFilters button{flex:1;min-height:42px;padding:9px 16px;border-radius:10px;font-size:14px;color:var(--muted)}
#page-explore #typeFilters button[aria-pressed="true"]{background:var(--primary);color:var(--button-ink);box-shadow:none}
.explore-story-kind{display:flex;align-items:center;gap:12px;color:var(--muted);font:500 13px/1.5 var(--sans)}
.explore-story-kind select{min-height:44px;min-width:140px;border:1px solid var(--line-strong);border-radius:11px;padding:8px 28px 8px 12px;background:var(--field-bg);color:var(--ink);font:inherit}
.explore-hub-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 14px}
.explore-hub-heading h2{font:500 15px/1.5 var(--sans);color:var(--muted);margin:0}
.explore-hub-heading .text-button{display:flex;align-items:center;gap:8px;white-space:nowrap;min-height:44px;font:600 13px/1.4 var(--sans)}
.explore-hub-heading .text-button svg{width:17px;height:17px}
.explore-topic-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.explore-topic{display:flex;flex-direction:column;align-items:stretch;min-width:0;padding:7px 7px 12px;gap:10px;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);text-align:center;box-shadow:var(--shadow)}
.explore-topic:hover{border-color:var(--primary);background:var(--surface-raised)}
.explore-topic-image{display:block;width:100%;height:135px;object-fit:cover;border-radius:14px}
.explore-topic-name{font:500 21px/1.35 var(--serif);color:var(--ink);padding-inline:5px;text-wrap:balance;min-height:28px}
html[data-layout="saffron"]:not([data-theme="night"]) .explore-topic-image{border-radius:70px 70px 8px 8px}
html[data-layout="geometry"]:not([data-theme="night"]) .explore-topic{border-radius:22px 22px 35px 22px}
html[data-theme="night"] .explore-topic-image{border-radius:50px 50px 10px 10px}
#page-explore .explore-sections{margin:18px 0 0}
.explore-faith-entry{display:flex;align-items:center;gap:16px;width:100%;min-height:70px;border:1px solid var(--line);border-radius:17px;padding:8px 17px 8px 8px;background:var(--surface-soft);color:var(--ink);text-align:start;font:600 15px/1.5 var(--sans)}
.explore-faith-entry img{display:block;flex:none;width:64px;height:52px;object-fit:cover;border-radius:11px}
.explore-faith-entry>span{flex:1}.explore-faith-entry>svg{width:20px;height:20px;flex:none;color:var(--primary-dark)}
.explore-faith-entry:hover{border-color:var(--primary)}
.explore-context{position:sticky;top:calc(88px + env(safe-area-inset-top,0px));z-index:10;background:var(--bg);margin:0 -12px 18px;padding:16px 12px 13px;border-bottom:1px solid var(--line)}
.explore-back{display:inline-flex;align-items:center;gap:8px;min-height:44px;font:600 13px/1.4 var(--sans);color:var(--primary-dark);margin:0 0 2px}
.explore-back svg{width:18px;height:18px;transform:rotate(180deg)}
html[dir="rtl"] .explore-back svg{transform:none}
.explore-context-title{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:0}
#exploreCollectionTitle{margin:0;font:500 33px/1.25 var(--serif);color:var(--ink);min-width:0;letter-spacing:-.4px}
#changeFaith{min-height:44px;flex:none;font:600 12px/1.5 var(--sans);color:var(--primary-dark)}
.faith-selection-summary{color:var(--muted);font:500 13px/1.6 var(--sans);margin:9px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#page-explore .collection-heading{margin:6px 0 13px}
#page-explore .collection-heading p{margin:0;font:500 13px/1.5 var(--sans);color:var(--muted)}
.explore-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.explore-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:6px;align-items:center;min-width:0;padding:12px 10px 12px 12px;border:1px solid var(--line);border-radius:17px;background:var(--surface);box-shadow:none}
.explore-row:hover{border-color:var(--line-strong)}
.explore-row-open{display:grid;grid-template-columns:84px minmax(0,1fr);gap:15px;align-items:center;min-width:0;border:0;padding:0;background:none;text-align:start;color:var(--ink)}
.explore-row-image{display:block;width:84px;height:112px;object-fit:cover;border-radius:10px}
.explore-row-copy{display:flex;flex-direction:column;align-items:stretch;min-width:0;gap:6px}
.explore-row-meta{font:500 11px/1.5 var(--sans);color:var(--muted)}
#page-explore .explore-row-title{font:500 23px/1.3 var(--serif);color:var(--ink);letter-spacing:0;margin:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.explore-row-excerpt{font:400 13px/1.55 var(--sans);color:var(--muted);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.explore-row-action{align-self:center}.explore-row-action .save-button{width:40px;height:44px;border:0;background:transparent;color:var(--primary-dark)}
.explore-row-action .save-button:hover,.explore-row-action .save-button[aria-pressed="true"]{background:var(--primary-soft)}
.explore-row-action svg{width:19px;height:19px;vertical-align:middle}
.explore-results>.empty-state{grid-column:1/-1;padding:35px 22px;box-shadow:none}
.explore-results>.empty-state .btn{margin-top:15px}
.explore-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 8px;padding:12px 0;border-top:1px solid var(--line)}
.explore-pager .btn{min-height:44px;font:600 13px/1.4 var(--sans);gap:9px;padding:10px 14px}
.explore-pager .btn:disabled{opacity:.45;cursor:default}
#explorePrevious svg{transform:rotate(180deg)}html[dir="rtl"] #explorePrevious svg{transform:none}
.explore-page-position{font:500 13px/1.5 var(--sans);color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
#page-explore .faith-collections{margin:0 0 22px}
#page-explore .faith-heading{margin:3px 0 16px}
#page-explore .faith-heading h2{font-size:27px;line-height:1.4}
#page-explore .faith-choice{min-height:155px}
#page-explore .faith-choice-copy strong{font-size:25px}
#page-explore .faith-choice-copy>span{font-size:11px;line-height:1.5}
#page-explore .faith-daily-row{margin:18px 0}
#browseFaith{width:100%;justify-content:space-between}
@media(min-width:681px) and (max-width:920px){.explore-context{top:138px}}
@media(max-width:800px){
  .explore-results{grid-template-columns:1fr}
  .explore-row-open{grid-template-columns:94px minmax(0,1fr)}
  .explore-row-image{width:94px;height:106px}
}
@media(max-width:680px){
  #page-explore .explore-heading{padding:22px 0 15px}
  #page-explore .explore-heading h1{font-size:36px;line-height:1.25}
  #page-explore .explore-toolbar{gap:10px;margin-bottom:14px}
  #page-explore .search-box input{font-size:15px;min-height:49px}
  .explore-search-clear{top:3px}
  .explore-hub-heading{margin-bottom:10px}.explore-hub-heading h2{font-size:13px}
  .explore-hub-heading .text-button{font-size:12px;min-height:38px}
  .explore-topic-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .explore-topic{padding:5px 5px 10px;gap:8px;border-radius:16px}
  .explore-topic-image{height:79px;border-radius:11px}
  .explore-topic-name{font-size:18px;line-height:1.35;min-height:25px}
  #page-explore .explore-sections{margin-top:14px}
  .explore-faith-entry{min-height:63px;padding:7px 13px 7px 7px;gap:13px;font-size:14px}
  .explore-faith-entry img{width:54px;height:46px}
  .explore-context{top:calc(72px + env(safe-area-inset-top,0px));margin-bottom:15px;padding-top:11px;padding-bottom:12px}
  /* Arabic wordmark: 48px line box + 28px header padding + 1px rule. */
  html[lang="ar"] .explore-context{top:calc(77px + env(safe-area-inset-top,0px))}
  .explore-back{font-size:12px;min-height:38px}
  #exploreCollectionTitle{font-size:28px;line-height:1.35}
  #changeFaith{font-size:11px;max-width:95px;text-align:end}
  #page-explore #typeFilters{flex-basis:100%;width:100%}
  #page-explore #typeFilters button{font-size:13px;min-height:40px;padding:8px 12px}
  .explore-story-kind{justify-content:space-between;width:100%;font-size:12px}
  .explore-story-kind select{min-width:155px}
  .explore-results{gap:10px}
  .explore-row{padding:10px 7px 10px 10px;gap:2px;border-radius:14px;grid-template-columns:minmax(0,1fr) 40px}
  .explore-row-open{grid-template-columns:75px minmax(0,1fr);gap:12px}
  .explore-row-image{width:75px;height:96px;border-radius:9px}
  .explore-row-copy{gap:5px}
  #page-explore .explore-row-title{font-size:22px;line-height:1.35}
  .explore-row-meta{font-size:10.5px;line-height:1.5}
  .explore-row-excerpt{font-size:13px;line-height:1.55;-webkit-line-clamp:1}
  .explore-row-action .save-button{width:38px;height:44px}
  .explore-pager{margin-top:15px;gap:7px}.explore-pager .btn{font-size:12px;padding:10px 12px;gap:6px}
  .explore-page-position{font-size:12px}
  #page-explore .faith-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  #page-explore .faith-choice{min-height:135px}
  #page-explore .faith-choice-copy{padding:32px 12px 12px}
  #page-explore .faith-choice-copy strong{font-size:22px}
  #page-explore .faith-choice-copy>span{font-size:10px;line-height:1.5}
  #page-explore .faith-heading h2{font-size:25px}
}
@media(max-width:450px){
  .explore-context{top:calc(68px + env(safe-area-inset-top,0px))}
  html[lang="ar"] .explore-context{top:calc(73px + env(safe-area-inset-top,0px))}
}
@media(max-width:360px){
  /* The smaller wordmark fits within the 44px night toggle at this width. */
  html[lang="ar"] .explore-context{top:calc(69px + env(safe-area-inset-top,0px))}
  .explore-topic-grid{gap:10px}.explore-topic-image{height:68px}.explore-topic-name{font-size:16px;line-height:1.4}
  .explore-row-open{grid-template-columns:62px minmax(0,1fr);gap:10px}.explore-row-image{width:62px;height:90px}
  .explore-row{padding:9px 5px 9px 9px;grid-template-columns:minmax(0,1fr) 36px}
  #page-explore .explore-row-title{font-size:21px}.explore-row-action .save-button{width:35px}
  .explore-row-meta{font-size:10px}.explore-pager .btn{padding-inline:10px}
  .explore-pager .icon{width:17px;height:17px}
  #page-explore .faith-choice-copy strong{font-size:20px}
}
