


.sp-v:not(.sp-v-x) { display: none; }
[data-sp="c"] .sp-v-x, [data-sp="s"] .sp-v-x, [data-sp="e"] .sp-v-x, [data-sp="a"] .sp-v-x { display: none; }
[data-sp="c"] .sp-v-c, [data-sp="s"] .sp-v-s, [data-sp="e"] .sp-v-e, [data-sp="a"] .sp-v-a { display: revert; }


.sp-mark { position: relative; flex: none; width: 16px; height: 16px; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff; }
.is-done .sp-mark { border-color: #a9d6b8; background: #e9f6ee; }
.is-done .sp-mark::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #3c8b5a; border-width: 0 2px 2px 0; transform: rotate(45deg); }


.sp-trail { margin: 0 0 14px; font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--steel-text); }
.sp-trail a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.sp-sep { margin: 0 8px; font-weight: 400; }


.as-rail-panel:has(.sp-rail) .as-rail-title { display: none; }
.sp-rail-head { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; padding: 0 8px; }
.sp-rail-head a { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-text); text-decoration: none; }
.sp-rail-head a:hover { text-decoration: underline; }
.sp-rail-head span { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--navy-text); }
.sp-rail-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sp-rail-group { margin: 12px 0 2px; padding: 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-text); } 
.sp-rail-group span { font-weight: 600; letter-spacing: 0; text-transform: none; }
.sp-rail-head + .sp-rail-group { margin-top: 4px; }
.sp-rail-list > li > a, .sp-rail-name { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--navy-text); text-decoration: none; }
.sp-rail-list > li > a:hover { background: var(--steel-soft); }
.sp-rail-list > li.is-here > .sp-rail-name { font-weight: 700; }
.sp-rail-list > li.is-here > .sp-rail-name .sp-mark { border-color: var(--steel-text); }
.sp-rail-list .as-rail-list { margin: 2px 0 6px 20px; }
.sp-rail-list .as-rail-list:has(> li:only-child) { display: none; }  


.sp-num { flex: none; min-width: 12px; font-weight: 700; color: var(--steel-text); }
.as-rail-list.is-sections a { gap: 8px; }
.as-rail-list.is-sections a::before { content: ""; flex: none; width: 12px; height: 12px; box-sizing: border-box; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff; }
.as-rail-list.is-sections .as-rail-num { display: inline; width: auto; min-width: 24px; height: auto; border: 0; border-radius: 0; background: none; color: var(--steel-text); font-size: 13px; font-weight: 700; }
.as-rail-list.is-sections li.is-ahead .as-rail-num { border: 0; background: none; color: #64748b; }
.as-rail-list.is-sections li.is-current .as-rail-num { border: 0; background: none; color: var(--steel-text); }
.as-rail-list.is-sections li.is-current a::before { border-color: var(--steel-text); background: var(--steel-text); }
.as-rail-list.is-sections li.is-read .as-rail-num { border: 0; background: none; color: var(--steel-text); }
.as-rail-list.is-sections li.is-read .as-rail-num::after { content: none; }
.as-rail-list.is-sections li.is-read a::before { border-color: #a9d6b8; background: #e9f6ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2l2 2 4-4.4' fill='none' stroke='%233c8b5a' stroke-width='1.8'/%3E%3C/svg%3E") center / 10px no-repeat; }


.sp-bottom { padding-top: 48px; padding-bottom: 48px; }
.sp-pn { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; max-width: 900px; margin: 0 auto; }
.sp-prev, .sp-next { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); text-decoration: none; transition: border-color .15s; }

.sp-prev { grid-column: 1; }
.sp-next { grid-column: 3; align-items: flex-end; text-align: right; border-color: var(--navy-btn); }
.sp-home { grid-column: 2; align-self: center; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--steel-text); text-decoration: none; }
.sp-home .icon { width: 22px; height: 22px; }
.sp-home:hover span { text-decoration: underline; text-underline-offset: 3px; }
.sp-prev:hover, .sp-next:hover { border-color: var(--steel); }
.sp-pn-dir { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--steel-text); }
.sp-pn-dir .icon { width: 16px; height: 16px; }
.sp-pn-title { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--navy-text); }
.sp-fork { max-width: 820px; margin: 28px auto 0; }
.sp-fork-head { margin: 0 0 12px; font-size: 17px; font-weight: 600; color: var(--navy-text); }
.sp-fork-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0; padding: 0; list-style: none; }
.sp-fork-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; border: 2px solid var(--navy-btn); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); text-decoration: none; transition: border-color .15s; }
.sp-fork-card:hover { border-color: var(--steel); }
.sp-fork-track { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-text); }
.sp-fork-name { display: inline-flex; align-items: center; gap: 4px; font-size: 20px; font-weight: 700; color: var(--navy-text); }
.sp-fork-name .icon { width: 18px; height: 18px; }
.sp-fork-for { font-size: 15px; line-height: 1.45; color: var(--text); }
.sp-also { max-width: 820px; margin: 24px auto 0; font-size: 16px; text-align: center; color: var(--text); }


.sp-path-track .sp-mark { width: 16px; height: 16px; border: 0; background: none; }
.sp-path-track .sp-mark::before { content: ""; position: absolute; left: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--steel); }
.sp-path-track .is-done .sp-mark { border: 2px solid #a9d6b8; background: #e9f6ee; }
.sp-path-track .is-done .sp-mark::before { display: none; }
.sp-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }  
.sp-path { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); }
.sp-path h3 { margin: 0 0 6px; font-size: 22px; line-height: 1.25; color: var(--navy-text); }
.sp-path-for { margin: 0 0 16px; font-size: 15px; line-height: 1.45; color: var(--text); }
.sp-path-time { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--steel-text); }  
.sp-path-list { display: grid; align-content: start; gap: 12px; flex: 1; margin: 0 0 20px; padding: 0; list-style: none; }
.sp-path-track-name { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-text); }
.sp-path-track-min { font-weight: 600; letter-spacing: 0; text-transform: none; }
.sp-path-track ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sp-path-track a { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 15px; line-height: 1.35; color: var(--navy-text); text-decoration: none; }
.sp-path-track a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sp-path-start { align-self: flex-start; }

.sp-path-option label { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--navy-text); cursor: pointer; }
.sp-path-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--steel-text); cursor: pointer; }
.sp-path .sp-opt-on { display: none; }
.sp-path:has(.sp-opt-input:checked) .sp-opt-off { display: none; }
.sp-path:has(.sp-opt-input:checked) li.sp-opt-on { display: list-item; }
.sp-path:has(.sp-opt-input:checked) span.sp-opt-on { display: inline; }
.sp-path:has(.sp-opt-input:checked) .sp-path-start.sp-opt-on { display: inline-flex; }

.sp-path-evidence { padding-top: 12px; border-top: 1px solid var(--line); }
.sp-path-evidence ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sp-path-evidence a { display: inline-flex; align-items: center; gap: 4px; padding: 3px 0; font-size: 15px; color: var(--steel-text); text-decoration: none; }
.sp-path-evidence a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sp-path-evidence .icon { width: 15px; height: 15px; }
.sp-restart { margin: 24px 0 0; font-size: 15px; text-align: center; color: var(--text); }


.sp-example-switch { max-width: 820px; margin-left: auto; margin-right: auto; }
.sp-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sp-example { position: relative; height: 100%; text-decoration: none; }
.sp-example .sp-mark { position: absolute; top: 12px; right: 12px; }
.sp-examples li:not(.is-done) .sp-mark { display: none; }
.sp-case { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 28px; }

@media (max-width: 960px) {
  .sp-paths { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}
@media (max-width: 760px) {
  .sp-bottom { padding-top: 32px; padding-bottom: 32px; }
  .sp-pn, .sp-fork-list, .sp-examples { grid-template-columns: 1fr; }
  .sp-prev, .sp-next, .sp-home { grid-column: auto; }
  .sp-home { order: 3; flex-direction: row; justify-self: center; }
  .sp-pn-title { font-size: 16px; }
  .sp-path { padding: 20px; }
}





@media (prefers-color-scheme: dark) {
  .sp-mark { border-color: #39404b; background-color: #111620; }
  .is-done .sp-mark { border-color: #2e4b39; background-color: #1a202b; }
  .is-done .sp-mark::after { border-color: #3c8b5a; }
  .sp-rail-list > li.is-here > .sp-rail-name .sp-mark { border-color: #2f6fb5; }
  .as-rail-list.is-sections a::before { border-color: #39404b; background-color: #111620; }
  .as-rail-list.is-sections li.is-ahead .as-rail-num { color: #aec0d9; }
  .as-rail-list.is-sections li.is-current a::before { border-color: #2f6fb5; background-color: #2f6fb5; }
  .as-rail-list.is-sections li.is-read a::before { border-color: #2e4b39; background-color: #1a202b; }
  .sp-next { border-color: #8ba5d4; }
  .sp-prev:hover, .sp-next:hover { border-color: #4892dc; }
  .sp-fork-card { border-color: #8ba5d4; }
  .sp-fork-card:hover { border-color: #4892dc; }
  .sp-path-track .is-done .sp-mark { border-color: #2e4b39; background-color: #1a202b; }
}
