/* Sea to Plate page + Fish Twin quiz (uses the nautical chart theme tokens) */

/* Card + numbered steps */
.sp-card { padding: 1.25rem; }
@media (min-width: 640px) { .sp-card { padding: 2rem 2.25rem; } }
.sp-step + .sp-step { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--c-line); }
.sp-step-h { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; line-height: 1.2; color: var(--c-ink); }
.sp-step-n { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--f-mono); font-size: .8rem; font-weight: 700; background: var(--c-ink); color: var(--c-surface); }

/* Step 1: group tabs + species chips */
.sp-tabs { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; border-radius: .85rem; background: var(--c-surface2); border: 1px solid var(--c-line); }
.sp-tab { display: inline-flex; align-items: baseline; gap: .4rem; padding: .5rem .9rem; border: 0; border-radius: .6rem; background: none; color: var(--c-muted); font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.sp-tab small { font-family: var(--f-mono); font-size: .66rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--c-faint); }
.sp-tab:hover { color: var(--c-ink); }
.sp-tab.on { background: var(--c-surface); color: var(--c-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.sp-tab.on small { color: var(--c-accent); }
.sp-g-note { margin: .75rem 0 0; font-size: .85rem; line-height: 1.5; color: var(--c-muted); max-width: 44rem; }
.sp-g-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.sp-chip { display: inline-flex; align-items: center; gap: .65rem; text-align: left; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: .9rem; padding: .4rem 1rem .4rem .4rem; color: var(--c-ink); cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.sp-chip img { width: 3rem; height: 3rem; border-radius: .65rem; object-fit: cover; background: #F3EEE3; }
.sp-chip b { font-size: .92rem; font-weight: 700; line-height: 1.2; }
.sp-chip:hover { border-color: var(--c-accent); }
.sp-chip.on { background: color-mix(in srgb, var(--c-accent) 9%, var(--c-surface)); border-color: var(--c-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-accent) 35%, transparent); }
.sp-chip:focus-visible, .sp-tab:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* Step 2: species panel + steps */
.sp-jgrid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .sp-jgrid { grid-template-columns: minmax(0, 1fr) 17rem; gap: 2.5rem; } .sp-route { order: 2; position: sticky; top: 6rem; align-self: start; } }
.sp-route { display: flex; flex-direction: column; gap: .9rem; padding: 1rem; border: 1px solid var(--c-line); border-radius: 1rem; background: var(--c-surface2); }
.sp-route img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: .75rem; background: #F3EEE3; }
.sp-route-name { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; color: var(--c-ink); margin: 0; }
.sp-route-latin { font-style: italic; font-size: .82rem; color: var(--c-muted); margin: .1rem 0 0; }
.sp-route-line { margin: .7rem 0 0; font-size: .85rem; line-height: 1.45; color: var(--c-ink); }
.sp-route-line svg { display: inline-block; vertical-align: -2px; width: .95rem; height: .95rem; margin-right: .15rem; color: var(--c-coral); }
.sp-route-facts { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .8rem; color: var(--c-muted); line-height: 1.45; }
.sp-route-facts li { padding-left: .8rem; position: relative; margin-top: .2rem; }
.sp-route-facts li::before { content: ""; position: absolute; left: 0; top: .55em; width: .3rem; height: .3rem; border-radius: 9999px; background: var(--c-accent); }
@media (max-width: 899px) { .sp-route { flex-direction: row; align-items: flex-start; padding: .75rem; } .sp-route img { width: 5rem; flex: none; } }

/* Vertical journey: one step open at a time */
.sp-vtrack { min-width: 0; }
.sp-v-end { display: flex; align-items: center; gap: .55rem; margin: 0; padding: .35rem 0 .35rem .55rem; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-faint); }
.sp-v-end svg { width: 1.1rem; height: 1.1rem; color: var(--c-accent); }
.sp-vlist { list-style: none; margin: 0; padding: 0; position: relative; }
.sp-vlist::before { content: ""; position: absolute; left: 1.15rem; top: .4rem; bottom: .4rem; border-left: 2px dashed color-mix(in srgb, var(--c-accent) 45%, transparent); }
.sp-vlist-bonus { margin-top: .75rem; }
.sp-vlist-bonus::before { display: none; }
.sp-v { position: relative; }
.sp-v-head { width: 100%; display: flex; align-items: center; gap: .85rem; padding: .5rem .6rem .5rem 0; background: none; border: 0; border-radius: .75rem; text-align: left; cursor: pointer; color: var(--c-ink); }
.sp-v-head:hover .sp-v-txt b { color: var(--c-accent); }
.sp-v-head:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.sp-v-dot { position: relative; z-index: 1; flex: none; width: 2.3rem; height: 2.3rem; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; background: var(--c-surface); border: 2px solid var(--c-line); color: var(--c-accent); transition: background .2s ease, border-color .2s ease; }
.sp-v-dot svg { width: 1rem; height: 1rem; }
.sp-v.past .sp-v-dot { border-color: color-mix(in srgb, var(--c-accent) 60%, var(--c-line)); background: color-mix(in srgb, var(--c-accent) 10%, var(--c-surface)); }
.sp-v.open .sp-v-dot { background: var(--c-coral); border-color: var(--c-coral); color: #0B2242; }
.sp-v-bonus .sp-v-dot { border-style: dashed; }
.sp-v-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-v-txt small { font-size: .72rem; font-weight: 600; color: var(--c-muted); }
.sp-v-txt b { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.sp-v.open .sp-v-txt b { font-family: var(--f-display); font-size: 1.25rem; }
.sp-v-chev { flex: none; width: 1.1rem; height: 1.1rem; color: var(--c-faint); transition: transform .2s ease; }
.sp-v.open .sp-v-chev { transform: rotate(180deg); color: var(--c-accent); }
.sp-v-body { margin: .1rem 0 .9rem 3.15rem; padding: 1rem 1.15rem; background: var(--c-surface2); border: 1px solid var(--c-line); border-radius: .9rem; }
.sp-v-what { margin: 0; color: var(--c-ink); line-height: 1.6; font-size: .95rem; }
.sp-v-body .sp-tags { margin-top: .75rem; }
.sp-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.sp-tag { font-size: .75rem; font-weight: 700; color: var(--b-cat-fg); background: var(--b-cat-bg); border-radius: 9999px; padding: .2rem .6rem; }
.sp-v-path { margin-top: .75rem; font-size: .88rem; color: var(--c-muted); line-height: 1.55; }
.sp-v-path b { color: var(--c-ink); }
.sp-v-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .9rem; }
.sp-d-links { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: 0; }
.sp-v-next { white-space: nowrap; }

/* Sources (collapsed) */
.sp-src { margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--c-line); }
.sp-src summary { cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--c-muted); width: fit-content; }
.sp-src summary:hover { color: var(--c-accent); }
.sp-note { font-size: .78rem; color: var(--c-faint); margin-top: .6rem; line-height: 1.55; }
.sp-note a, .tw-bio a { color: var(--c-accent); font-weight: 600; }
.sp-note a:hover, .tw-bio a:hover { text-decoration: underline; }

/* Fish Twin */
.tw-card { padding: 1.5rem 1.25rem; }
.tw-card > * { max-width: 46rem; margin-left: auto; margin-right: auto; }
@media (min-width: 640px) { .tw-card { padding: 2.25rem 2.5rem; } }
.tw-head { text-align: center; margin-bottom: 1.25rem; }
.tw-intro { text-align: center; }
.tw-intro .bp-small { max-width: 30rem; margin: 0 auto; }
.tw-cta { margin-top: 1.2rem; }
.tw-qmeta { display: flex; align-items: center; gap: .8rem; font-family: var(--f-mono); font-size: .75rem; color: var(--c-muted); }
.tw-qmeta .bp-progress { flex: 1; margin: 0; }
.tw-opts .bp-opt { font-weight: 600; }
.tw-letter { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--f-mono); font-size: .72rem; font-weight: 700; background: var(--c-surface); border: 1px solid var(--c-line); color: var(--c-accent); }
.tw-back { display: inline-flex; align-items: center; gap: .3rem; margin-top: 1rem; font-size: .85rem; font-weight: 700; color: var(--c-accent); background: none; border: 0; cursor: pointer; }
.tw-back svg { width: .95rem; height: .95rem; }
.tw-back:hover { text-decoration: underline; }
.tw-res { display: grid; gap: 1.4rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 640px) { .tw-res { grid-template-columns: 11rem 1fr; } }
.tw-res-img { width: 100%; max-width: 11rem; height: auto; aspect-ratio: 1; border-radius: 1rem; object-fit: cover; margin: 0 auto; background: #F3EEE3; border: 1px solid var(--c-line); }
.tw-res-h { font-weight: 700; font-family: var(--f-display) !important; font-size: 2rem; line-height: 1.1; color: var(--c-ink); outline: none; margin-top: .2rem; }
.tw-res-sp { font-weight: 700; color: var(--c-ink); margin-top: .3rem; }
.tw-res-sp i { font-weight: 400; color: var(--c-muted); }
.tw-res-you { margin-top: .7rem; color: var(--c-ink); line-height: 1.6; }
.tw-bio, .tw-car { margin-top: .8rem; font-size: .9rem; color: var(--c-muted); line-height: 1.55; }
.tw-bio b, .tw-car b { color: var(--c-ink); }
.tw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--c-line); }
.tw-match { display: inline-flex; align-items: center; gap: .4rem; }
.tw-match svg { width: 1rem; height: 1rem; }
.tw-share { display: flex; flex-wrap: wrap; gap: .5rem; }
.tw-actions .tw-back { margin-top: 0; }
.tw-fun { text-align: center; margin-top: 1rem; }
#tw-q { outline: none; }

@media (max-width: 640px) {
  .sp-step-h { font-size: 1.15rem; }
  .sp-tabs { display: flex; width: 100%; }
  .sp-tab { flex: 1 1 0; flex-direction: column; align-items: center; gap: .1rem; padding: .45rem .3rem; font-size: .8rem; white-space: normal; text-align: center; }
  .sp-g-chips .sp-chip { flex: 1 1 calc(50% - .3rem); min-width: 0; padding: .35rem .5rem .35rem .35rem; gap: .5rem; }
  .sp-g-chips .sp-chip img { width: 2.4rem; height: 2.4rem; }
  .sp-g-chips .sp-chip b { font-size: .82rem; }
  .sp-v-body { margin-left: 0; margin-top: .4rem; }
  .sp-v-next { width: 100%; justify-content: center; }
  .tw-actions { flex-direction: column; align-items: stretch; }
  .tw-match { justify-content: center; }
  .tw-actions .tw-back { align-self: center; }
  .tw-share > * { flex: 1 1 0; justify-content: center; }
  .tw-res-h { font-size: 1.7rem; text-align: center; }
  .tw-res-sp, .tw-res-body > .bp-eyebrow { text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .sp-v-dot, .sp-v-chev, .sp-chip { transition: none; } }
.tw-qmeta + .bp-q { margin-top: 1.1rem; }
