/* ==========================================================================
   Listings, hubs, taxonomy archives, search, 404, region map
   ========================================================================== */

.hub-section + .hub-section { margin-top: 3rem; }
.load-more { display: flex; justify-content: center; margin-top: 2.5rem; }

.related-terms { margin-top: 3.5rem; padding: 1.5rem; background: var(--surface); border-radius: 20px; }
.related-terms h2 { font-family: var(--font-body); font-size: 0.92rem; font-weight: 650; color: var(--ink-mute); }


/* Search page */
.search-page .search-form { max-width: 40rem; margin-top: 1rem; }
.search-page__quick { list-style: none; padding: 0; margin: 1rem 0 0; max-width: 40rem; }
.search-page__quick a { display: flex; gap: 0.75rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.search-page__quick img { width: 3.5rem; height: 3.5rem; object-fit: cover; }
.search-page__quick small { display: block; color: var(--ink-mute); }
.result-type { font-size: 0.92rem; font-weight: 650; color: var(--lagoon); }

/* 404 */
.lost { padding-block: 3rem; }
.lost h1 { font-size: var(--step-4); }
.lost p { font-size: var(--step-1); color: var(--ink-soft); max-width: 36rem; }

/* Start here / hubs: numbered guide list */
.guide-list { counter-reset: guide; list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.guide-list li { counter-increment: guide; border-top: 1px solid var(--rule); }
.guide-list a { display: grid; gap: 0.25rem; padding: 1rem 0; color: var(--ink); text-decoration: none; }
.guide-list strong { font-family: var(--font-display); font-weight: 650; font-size: 1.12rem; letter-spacing: -0.015em; line-height: 1.25; }
.guide-list span { color: var(--ink-mute); font-size: 0.93rem; line-height: 1.45; }
.guide-list a:hover strong { color: var(--lagoon-deep); }
/* Numbered only where the list is a reading order. */
.guide-list--steps a { grid-template-columns: 2.5rem 1fr; column-gap: 0.75rem; }
.guide-list--steps a::before { content: counter(guide); font-family: var(--font-display); font-weight: 700; color: var(--lagoon); font-size: 1.35rem; line-height: 1.2; grid-row: span 2;  letter-spacing: -0.015em; }
@media (min-width: 860px) { .guide-list--2 { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; } }

.hub-cols { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .hub-cols { grid-template-columns: repeat(2, 1fr); gap: 3rem; } }
.hub-col h3 { font-size: var(--step-2); display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.2rem; }
.hub-col h3 .icon { color: var(--lagoon); }
.hub-col h3 a { color: var(--ink); text-decoration: none; }
.hub-col h3 a:hover { color: var(--lagoon); }
.hub-col > p { color: var(--ink-soft); margin-bottom: 0.5rem; }
.hub-col .text-link { margin-top: 0.75rem; }

.hub-col__more { font-size: 0.85rem; color: var(--ink-mute); margin-top: 0.75rem; }
.hub-col__more a { color: var(--ink-soft); }
.search-list { max-width: 48rem; }

/* ---------- Hub finder ---------- */
.hub-cats { margin-bottom: 0; }
.hub-start { padding-block: 2.5rem 0.5rem; }
.hub-start h2 { font-size: var(--step-2); margin-bottom: 1.25rem; }
.finder { padding-top: 2.5rem; }
.finder__bar { position: sticky; top: var(--header-h); z-index: 20; display: grid; gap: 0.9rem; margin-bottom: 1.75rem; padding: 1rem 0 0.9rem; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.admin-bar .finder__bar { top: calc(var(--header-h) + 46px); }
@media (min-width: 783px) { .admin-bar .finder__bar { top: calc(var(--header-h) + 32px); } }
.finder__title { font-size: var(--step-2); margin: 0; }
.finder__controls { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
@media (min-width: 600px) { .finder__controls { grid-template-columns: 1fr auto; } }
@media (min-width: 900px) { .finder__bar { grid-template-columns: auto 1fr; align-items: center; column-gap: 2rem; } .finder__controls { max-width: 40rem; justify-self: end; width: 100%; } .finder__facets, .finder__count { grid-column: 1 / -1; } }
.finder__search { position: relative; }
.finder__search .icon { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--ink-mute); pointer-events: none; }
.finder__search .field { padding-left: 2.6rem; }
.finder__sort .field { padding-right: 2rem; }
@media (min-width: 600px) { .finder__sort .field { width: auto; } }
.finder__facets { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.finder__facets::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .finder__facets { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }
.finder__facets button { flex: none; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.4rem; padding: 0.35rem 0.8rem; border: 1.5px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink-soft); font-weight: 600; font-size: 0.93rem; cursor: pointer; }
.finder__facets button span { color: var(--ink-mute); font-weight: 500; font-size: 0.85em; }
.finder__facets button:hover { border-color: var(--ink-mute); color: var(--ink); }
.finder__facets button[aria-pressed="true"] { background: var(--lagoon-wash); border-color: var(--lagoon); color: var(--lagoon-deep); }
.finder__count { font-size: 0.9rem; color: var(--ink-mute); margin: 0; }
.finder__grid .story[hidden] { display: none; }
.finder__empty { text-align: center; padding: 2.5rem 1rem; background: var(--surface); border-radius: var(--r-lg); }

/* Less space between the hub heading and the list that follows it. */
.hub-head:has(+ .finder), .hub-head:has(+ .hub-start), .hub-head:has(+ .wrap .hub-cats) { padding-bottom: 1.25rem; }
.hub-head + .finder { padding-top: 0.75rem; }
.hub-head + .hub-start { padding-top: 1rem; }
.finder__sentinel { height: 0; }

/* ---------- Finder bar once it sticks under the header: one compact row ---------- */
.finder__bar { transition: padding .2s ease, box-shadow .2s ease; }
.finder__bar.is-stuck { gap: 0.5rem; padding-block: 0.5rem; box-shadow: 0 10px 18px -16px rgb(20 35 42 / .45); }
.finder__bar.is-stuck .finder__title, .finder__bar.is-stuck .finder__count { display: none; }
.finder__bar.is-stuck .finder__controls { grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem; }
.finder__bar.is-stuck .field { min-height: 2.5rem; padding-top: 0.35rem; padding-bottom: 0.35rem; font-size: 0.95rem; }
.finder__bar.is-stuck .finder__sort .field { width: 9.5rem; padding-left: 0.7rem; }
.finder__bar.is-stuck .finder__facets { flex-wrap: nowrap; overflow-x: auto; }
.finder__bar.is-stuck .finder__facets button { min-height: 2.1rem; padding: 0.2rem 0.7rem; font-size: 0.87rem; }
@media (min-width: 900px) {
  .finder__bar.is-stuck { grid-template-columns: minmax(0, 1fr) minmax(20rem, 30rem); }
  .finder__bar.is-stuck .finder__facets { grid-column: 1; grid-row: 1; margin: 0; padding: 0; -webkit-mask-image: linear-gradient(to right, #000 92%, transparent); mask-image: linear-gradient(to right, #000 92%, transparent); }
  .finder__bar.is-stuck .finder__controls { grid-column: 2; grid-row: 1; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .finder__bar { transition: none; } }

/* ---------- Phones: hub list as compact rows ---------- */
@media (max-width: 599px) {
  .hub-head { padding-block: 1.75rem 1.5rem; }
  .hub-head__intro { font-size: 1.06rem; line-height: 1.55; }
  .finder__grid { gap: 0; }
  .finder__grid .story { flex-direction: row; align-items: flex-start; gap: 0.9rem; padding-block: 0.9rem; border-top: 1px solid var(--rule); }
  .finder__grid .story:first-child { border-top: 0; padding-top: 0.25rem; }
  .finder__grid .story__media { width: 6.5rem; aspect-ratio: 1; flex: none; border-radius: var(--radius); }
  .finder__grid .story__body { gap: 0.3rem; min-width: 0; }
  .finder__grid .story__title { font-size: 1.02rem; line-height: 1.3; }
  .finder__grid .story__dek { display: none; }
  .finder__grid .story__meta { font-size: 0.82rem; gap: 0.15rem 0.7rem; }
  .finder__grid .save-btn { top: 1.15rem; left: 0.25rem; right: auto; width: 2rem; height: 2rem; }
  .finder__grid .story:first-child .save-btn { top: 0.5rem; }
  .finder__grid .save-btn .icon { width: 0.95rem; height: 0.95rem; }
  .related-terms { padding: 1.1rem; margin-top: 2.5rem; }
}

.finder__heading { font-size: var(--step-2); margin: 0 0 1.5rem; }

/* ---------- Start here ---------- */
.start-head { background: var(--paper-deep); padding-bottom: 2.5rem; }
.start-paths { display: grid; gap: 0.75rem; margin-top: 1.75rem; }
@media (min-width: 720px) { .start-paths { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2.25rem; } }
.start-path { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-lg); background: var(--band); color: #fff; text-decoration: none; isolation: isolate; }
.start-path img, .start-path .story__placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.start-path::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(8 30 32 / .88) 0%, rgb(8 30 32 / .35) 55%, rgb(8 30 32 / 0) 80%); }
.start-path:hover img { transform: scale(1.04); }
.start-path__text { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 0.2rem; padding: 1.1rem 1.25rem; }
.start-path__text strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 650; line-height: 1.15; letter-spacing: -0.02em; }
.start-path__text strong::after { content: " →"; font-family: var(--font-body); font-weight: 500; }
.start-path__text small { font-size: 0.88rem; color: rgb(255 255 255 / .82); }
@media (max-width: 719px) {
  .start-path { aspect-ratio: auto; min-height: 6.5rem; }
  .start-path__text { position: relative; min-height: 6.5rem; align-content: end; }
  .start-path__text strong { font-size: 1.15rem; }
}

.start-section { scroll-margin-top: 4.5rem; }
.start-section--alt { background: var(--surface); }
.start-section__head { margin-bottom: 1.75rem; }
.start-section__head h2 { margin: 0 0 0.4rem; }
.start-section__head p { margin: 0; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.5; }

.start-first { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 2rem 1.5rem; }
@media (min-width: 720px) { .start-first { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.start-first > li { counter-increment: step; position: relative; }
.start-first > li::before { content: counter(step); position: absolute; top: 0.75rem; left: 0.75rem; z-index: 3; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--paper); color: var(--lagoon-deep); font-family: var(--font-display); font-weight: 700; box-shadow: 0 2px 8px rgb(20 35 42 / .18); }

.start-then { font-size: 1.05rem; color: var(--ink-mute); margin: 2.5rem 0 0.5rem; }
.start-rest { list-style: none; margin: 0; padding: 0; display: grid; column-gap: 2.5rem; }
@media (min-width: 720px) { .start-rest { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.start-rest > li { border-top: 1px solid var(--rule); padding-block: 0.9rem; }
.start-rest .story--row .story__media { width: 5rem; }
.start-more { margin: 1.75rem 0 0; }

.start-creole { background: var(--lagoon-wash); }
.start-creole__grid { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .start-creole__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2rem; align-items: stretch; } }
.start-word { padding: 1.5rem; background: var(--paper); border-radius: var(--r-lg); display: grid; align-content: start; gap: 0.35rem; }
.start-word__label { margin: 0; font-size: 0.9rem; font-weight: 650; color: var(--lagoon-deep); }
.start-word__creole { display: flex; align-items: center; gap: 0.6rem; margin: 0; font-family: var(--font-display); font-size: var(--step-3); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.start-word__english { margin: 0 0 0.75rem; color: var(--ink-soft); font-size: 1.1rem; }
.start-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
@media (min-width: 600px) { .start-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.start-links a { display: grid; gap: 0.25rem; height: 100%; padding: 1.1rem 1.25rem; background: var(--paper); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; border: 1.5px solid transparent; transition: border-color .15s; }
.start-links a:hover { border-color: var(--lagoon); }
.start-links strong { font-family: var(--font-display); font-weight: 650; font-size: 1.08rem; }
.start-links strong::after { content: " →"; color: var(--lagoon); font-family: var(--font-body); }
.start-links span { font-size: 0.92rem; color: var(--ink-mute); line-height: 1.45; }

/* Phones: first guide as a card, the next two as compact rows. */
@media (max-width: 719px) {
  .start-first { gap: 0; }
  .start-first > li:first-child { padding-bottom: 1.25rem; }
  .start-first > li:not(:first-child) { border-top: 1px solid var(--rule); padding-block: 0.9rem; }
  .start-first > li:not(:first-child) .story { flex-direction: row; align-items: flex-start; gap: 0.9rem; }
  .start-first > li:not(:first-child) .story__media { width: 6rem; aspect-ratio: 1; flex: none; border-radius: var(--radius); }
  .start-first > li:not(:first-child) .story__dek, .start-first > li:not(:first-child) .save-btn { display: none; }
  .start-first > li:not(:first-child) .story__title { font-size: 1.02rem; line-height: 1.3; }
  .start-first > li:not(:first-child)::before { top: 1.3rem; left: 0.4rem; width: 1.75rem; height: 1.75rem; font-size: 0.85rem; }
  .start-then { margin-top: 1.25rem; }
  .start-section__head p { font-size: 1.05rem; }
}
