.sf-case-intro { margin: 1.25rem 0 1.5rem; }
.sf-case-intro h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 .4rem; }
.sf-case-intro p { color: var(--bh-muted); line-height: 1.6; margin: 0; max-width: 68ch; }
.sf .sf-legend { text-align: left; font-size: .95rem; font-weight: 650; color: var(--bh-ink); margin-bottom: .75rem; }
.sf-chain { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.sf-chain li { position: relative; min-width: 0; }
.sf-chain li:not(:last-child)::after { position: absolute; content: ""; width: .6rem; height: 1px; background: var(--bh-line); right: -.8rem; top: 50%; }
.sf-station, .sf-endpoint { display: flex; min-height: 80px; align-items: center; justify-content: center; text-align: center; padding: .65rem .35rem; overflow-wrap: anywhere; font-weight: 650; }
.sf-station { position: relative; border: 1px solid var(--bh-line); border-radius: 10px; cursor: pointer; background: #fff; }
.sf-station input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sf-station:has(input:checked) { color: #085c55; border-color: var(--bh-accent); background: var(--bh-selected); }
.sf-station:has(input:focus-visible) { outline: 3px solid var(--bh-accent); outline-offset: 3px; }
.sf-station span { min-width: 0; }
.sf-endpoint { color: var(--bh-muted); background: #f3f6f5; border-radius: 10px; }
.sf-repairs { margin-top: 1.5rem !important; }
.sf-choices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sf-choices .bh-choice { min-height: 64px; }
.sf-selection { color: var(--bh-muted); font-size: .9rem; line-height: 1.5; margin: 1rem 0 -.5rem; overflow-wrap: anywhere; }
.sf-hint-copy { color: #145f54; background: #edf6f3; border-radius: 8px; padding: .7rem .85rem; line-height: 1.6; margin: .7rem 0 0; }
.sf-attempts { list-style: none; padding: 0; margin: 1.2rem 0 0; font-size: .85rem; }
.sf-attempts li { display: flex; align-items: baseline; gap: .6rem; justify-content: space-between; padding: .65rem 0; border-top: 1px solid var(--bh-line); }
.sf-attempts span { overflow-wrap: anywhere; }
.sf-attempts small { flex-shrink: 0; color: var(--bh-muted); font-size: .8rem; }
.sf-attempts li.is-solved { color: #085c55; }
.sf.is-finished .sf-attempts li { flex-wrap: wrap; }
.sf-attempts .sf-attempt-reason { flex-basis: 100%; min-width: 0; margin: 0; color: var(--bh-muted); line-height: 1.6; overflow-wrap: anywhere; }
.sf-repaired { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: center; margin: 1.25rem 0; padding: 1rem; border-radius: 10px; background: var(--bh-selected); }
.sf-repaired span { overflow-wrap: anywhere; font-weight: 550; }
.sf-repaired strong { color: #085c55; overflow-wrap: anywhere; font-weight: 760; }
.sf-repaired i { color: var(--bh-accent); }
.sf-links { padding-left: 1.25rem; margin: 0 0 .75rem; }
.sf-links li { padding: .4rem 0; color: var(--bh-muted); line-height: 1.6; }
.sf-challenge-note { color: var(--bh-muted); font-size: .85rem; line-height: 1.6; margin: .8rem 0 0; }
.sf-share-text { display: block; resize: vertical; width: 100%; padding: .85rem; color: var(--bh-ink); background: #f3f6f5; border: 1px solid var(--bh-line); border-radius: 8px; font: inherit; font-size: .9rem; line-height: 1.6; }
.sf :is(textarea, #sf-result-title):focus-visible { outline: 3px solid var(--bh-accent); outline-offset: 4px; }
.sf .bh-secondary:disabled { color: #596666; background: #e9eeee; cursor: default; }
@media (hover: hover) { .sf-station:has(input:not(:disabled)):hover { border-color: var(--bh-accent); background: #f4f9f7; } }
@media (max-width: 540px) {
    .sf-case-intro { margin: .8rem 0 1.1rem; }
    .sf-chain { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
    .sf-chain li:not(:last-child)::after { top: auto; bottom: -.5rem; right: 50%; width: 1px; height: .35rem; }
    .sf-station { min-height: 48px; padding: .65rem; font-size: .95rem; }
    .sf-endpoint { min-height: 36px; padding: .4rem; font-size: .9rem; }
    .sf-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sf-choices .bh-choice { min-height: 56px; }
    .sf .bh-play-actions { flex-wrap: wrap; }
    .sf .bh-play-actions .bh-primary { flex-basis: 100%; }
    .sf .bh-play-actions .bh-text-button { margin-left: auto; padding-top: .4rem; padding-bottom: .4rem; }
    .sf-attempts li { flex-wrap: wrap; gap: .2rem .6rem; }
    .sf-repaired { gap: .45rem; font-size: .9rem; padding: .85rem .6rem; }
}
