.sp-page { padding: 20px 0 56px; }
.sp-shell { width: min(100% - 24px, 1480px); margin-inline: auto; }

.sp-upgrade-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.55);
}
.sp-upgrade-modal {
  position: fixed;
  z-index: 210;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  max-width: 760px;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--cf-line);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  padding: 28px 22px 20px;
  box-sizing: border-box;
}
.sp-upgrade-overlay[hidden],
.sp-upgrade-modal[hidden] {
  display: none !important;
}
.sp-upgrade-x {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 0.85;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
}
.sp-upgrade-x:hover { color: var(--cf-ink); }
.sp-upgrade-modal h2 {
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
}
.sp-upgrade-sub {
  margin: 8px 0 16px;
  text-align: center;
  color: var(--cf-muted);
}
.sp-upgrade-modal .cf-plan-grid {
  margin-top: 8px;
  max-width: none;
}
.sp-upgrade-modal .cf-plan-grid.is-compact .cf-plan-card {
  padding: 22px 16px 16px;
}
.sp-upgrade-pricing {
  display: block;
  margin: 14px auto 4px;
  text-align: center;
  color: var(--cf-accent);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}
.sp-upgrade-pricing:hover { text-decoration: underline; }
body.sp-upgrade-lock { overflow: hidden; }

.sp-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.sp-col-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sp-side {
  flex: 0 0 280px;
  width: 280px;
}
.sp-ad {
  text-align: center;
  width: 100%;
  max-width: 100%;
}
.sp-ad ins.adsbygoogle {
  max-width: 100% !important;
}
.sp-ad-leader {
  margin: 16px auto 0;
  min-height: 90px;
  max-width: 728px;
}
.sp-ad-side {
  margin: 12px auto;
  min-height: 250px;
  max-width: 300px;
}
@media (max-width: 900px) {
  .sp-layout { flex-direction: column; }
  .sp-side { flex: 1 1 auto; width: 100%; }
}

.sp-main,
.sp-card,
.sp-video {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-radius);
  box-shadow: var(--cf-shadow);
}

.sp-main { padding: 22px 22px 18px; }

.sp-pro-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 16px;
  padding: 10px 16px;
  background: #22c55e;
  color: #fff;
  border-radius: 12px;
  text-align: center;
}
.sp-pro-banner[hidden] { display: none !important; }
.sp-pro-banner p {
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}
.sp-pro-banner-btn {
  appearance: none;
  border: 1.5px solid #fff;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.sp-pro-banner-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.sp-head h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-transform: none;
}
.sp-head h1 span {
  font-weight: 600;
  color: var(--cf-muted);
  font-size: 0.72em;
}

.sp-transport {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
}
.sp-play,
.sp-skip {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sp-play-wrap {
  position: relative;
  flex: 0 0 auto;
}
.sp-play {
  background: var(--cf-accent);
  color: #fff;
  font-size: 1rem;
}
.sp-play:hover { background: var(--cf-accent-hover); }
.sp-sync-tip {
  position: absolute;
  z-index: 40;
  left: 0;
  top: calc(100% + 12px);
  width: min(300px, 78vw);
  margin: 0;
  padding: 10px 12px;
  background: #0f172a;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 10px;
  border-left: 3px solid var(--cf-accent);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}
.sp-sync-tip[hidden] { display: none !important; }
.sp-sync-tip::before {
  content: '';
  position: absolute;
  left: 16px;
  top: -7px;
  border: 7px solid transparent;
  border-bottom-color: #0f172a;
  border-top-width: 0;
}
.sp-skip {
  background: #f1f5f9;
  color: var(--cf-ink);
}
.sp-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 3.2em;
  color: var(--cf-muted);
}
.sp-seek {
  flex: 1;
  accent-color: var(--cf-accent);
  height: 4px;
}

.sp-chart {
  position: relative;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.sp-chart-scroll {
  position: relative;
  overflow: hidden;
  height: 72px;
}
.sp-chart-track {
  position: absolute;
  top: 0;
  left: 0;
  height: 72px;
  will-change: transform;
  backface-visibility: hidden;
}
.sp-cell {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 0;
  height: 72px;
  margin: 0;
  padding: 0 6px;
  border: 0;
  border-right: 1px solid #f7f7f8;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--cf-ink);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  outline: none;
  box-shadow: none;
}
.sp-cell-name {
  display: block;
  white-space: nowrap;
  line-height: 1;
  pointer-events: none;
}
.sp-cell:nth-child(even) { background: #fffaf5; }
.sp-cell.is-active {
  background: var(--cf-accent);
  color: #fff;
  z-index: 2;
  border-right-color: rgba(255, 255, 255, 0.4);
}
.sp-cell:focus,
.sp-cell:focus-visible {
  outline: none;
  box-shadow: none;
}
.sp-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: rgba(245, 124, 0, 0.45);
  pointer-events: none;
  z-index: 3;
}

.sp-diagrams-wrap { margin-top: 18px; position: relative; }
.sp-diagrams-wrap.is-locked .sp-diagrams,
.sp-diagrams-wrap.is-locked .sp-unique {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}
.sp-diagrams-lock {
  position: absolute;
  left: 0;
  right: 0;
  top: 72px;
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  text-align: center;
}
.sp-diagrams-lock[hidden] { display: none !important; }
.sp-diagrams-lock-copy {
  margin: 0;
  max-width: 420px;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
.sp-diagrams-lock-btn {
  appearance: none;
  border: 0;
  background: var(--cf-accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(245, 124, 0, 0.35);
}
.sp-diagrams-lock-btn:hover { background: var(--cf-accent-hover); }
.sp-daily-free {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #fff8f0;
  border: 1px solid #ffd7a8;
  border-radius: 12px;
}
.sp-daily-free[hidden] { display: none !important; }
.sp-daily-free-label,
.sp-daily-lock-label {
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cf-ink);
}
.sp-daily-lock-label { margin: 4px 0 0; }
.sp-daily-free-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sp-daily-free-list a,
.sp-daily-free-list .is-here {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}
.sp-daily-free-list a {
  background: #fff;
  border: 1px solid var(--cf-line);
  color: var(--cf-accent);
}
.sp-daily-free-list a:hover { border-color: var(--cf-accent); }
.sp-daily-free-list .is-here {
  background: var(--cf-accent-soft);
  color: var(--cf-ink);
}
.sp-diagrams-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 12px;
}
.sp-view-tabs {
  display: inline-flex;
  background: #f4f5f7;
  border-radius: 999px;
  padding: 3px;
}
.sp-view-tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cf-muted);
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.sp-view-tabs button.is-on {
  background: #fff;
  color: var(--cf-ink);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.sp-tools {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: flex-start;
  overflow-x: auto;
}
.sp-inst {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cf-muted);
  white-space: nowrap;
  flex: 0 0 auto;
}
.sp-inst select,
.sp-stepper b {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cf-ink);
  background: #fff;
  border: 1px solid var(--cf-line);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.sp-inst input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--cf-accent);
  cursor: pointer;
}
.sp-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sp-stepper button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--cf-line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.sp-stepper b {
  min-width: 2.4em;
  text-align: center;
  cursor: default;
  padding: 4px 8px;
}
.sp-speed { margin-left: 4px; }
.sp-tool-btn {
  appearance: none;
  border: 1px solid var(--cf-line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--cf-ink);
}
.sp-tool-btn[aria-pressed="true"] {
  background: var(--cf-ink);
  color: #fff;
  border-color: var(--cf-ink);
}
.sp-metro-wrap { gap: 6px; }
.sp-metro-wrap input[type="range"] {
  width: 72px;
  accent-color: var(--cf-accent);
  cursor: pointer;
}
.sp-pro {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: var(--cf-accent);
  vertical-align: super;
}
.sp-pro-msg {
  width: 100%;
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--cf-muted);
}
#sp-print-sheet { display: none; }
.sp-print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  justify-items: center;
}

.sp-diagrams {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: flex-end;
  overflow-x: auto;
  overflow-y: visible;
  padding: 18px 8px 8px;
}
.sp-diag {
  position: relative;
  flex: 0 0 auto;
  width: 132px;
  text-align: center;
  transition: transform 0.18s ease;
  padding-top: 10px;
}
.sp-diag-var {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
}
.sp-diag.has-vars .sp-diag-var { display: inline-flex; }
.sp-diag.is-active {
  width: 188px;
  transform: scale(1.02);
}
.sp-diag.is-active .sp-diag-name { color: var(--cf-accent); font-size: 1.2rem; }
.sp-diag img {
  width: 120px;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--cf-line);
  border-radius: 10px;
  background: #fff;
}
.sp-diag.is-active img,
.sp-diag.is-active .sp-diag-svg svg {
  width: 176px;
  border-color: var(--cf-accent);
  box-shadow: 0 8px 20px rgba(245, 124, 0, 0.18);
}
.sp-diag-svg {
  display: flex;
  justify-content: center;
  min-height: 88px;
}
.sp-diag-svg svg {
  width: 120px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.sp-diag--empty {
  visibility: hidden;
  pointer-events: none;
}
.sp-diag-name {
  margin-top: 6px;
  font-weight: 800;
  font-size: 0.95rem;
}
.sp-unique {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 18px 12px;
  justify-items: center;
  padding: 8px 0 4px;
}
.sp-unique[hidden],
.sp-inst[hidden],
.sp-diagrams[hidden],
.sp-modal[hidden] {
  display: none !important;
}

@media print {
  .sp-ad { display: none !important; }
  body * { visibility: hidden !important; }
  #sp-print-sheet,
  #sp-print-sheet * { visibility: visible !important; }
  #sp-print-sheet {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 16px;
    background: #fff;
  }
  #sp-print-sheet .sp-diag-var { display: none !important; }
}
.sp-unique .sp-diag {
  width: 148px;
  transform: none;
}
.sp-unique .sp-diag img,
.sp-unique .sp-diag-svg svg {
  width: 132px;
}

.sp-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sp-modal[hidden] { display: none; }
.sp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.sp-modal-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}
.sp-modal-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sp-modal-card h2 {
  margin: 0;
  font-size: 1.05rem;
}
.sp-modal-x {
  border: 0;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}
.sp-modal-sub {
  margin: 6px 0 14px;
  color: var(--cf-muted);
  font-size: 0.88rem;
}
.sp-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  justify-items: center;
}
.sp-modal-grid .sp-diag { width: 160px; }
.sp-modal-grid img,
.sp-modal-grid svg { width: 148px; height: auto; }

.sp-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #0f172a;
}
.sp-video iframe,
.sp-video #sp-yt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sp-card { padding: 16px 18px; margin-top: 12px; }
.sp-card h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}
.sp-card dl { margin: 0; }
.sp-card dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cf-muted);
  margin-top: 10px;
}
.sp-card dd { margin: 2px 0 0; font-weight: 650; }

.sp-similar {
  margin-top: 12px;
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-radius);
  box-shadow: var(--cf-shadow);
  padding: 14px 14px 10px;
}
.sp-similar h2 {
  margin: 0 12px 10px 4px;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-similar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sp-similar li + li { margin-top: 2px; }
.sp-similar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}
.sp-similar a:hover { background: #f3f6f8; }
.sp-similar img {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #e8eef2;
}
.sp-similar span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sp-similar strong {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-similar em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--cf-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-side-cta { width: 100%; margin-top: 12px; justify-content: center; }
.sp-more {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-radius);
  box-shadow: var(--cf-shadow);
  padding: 16px 16px 12px;
}
.sp-more h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}
.sp-more ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.sp-more a {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  overflow: hidden;
}
.sp-more a:hover { background: #f3f6f8; }
.sp-more img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #e8eef2;
  border-radius: 8px;
}
.sp-more strong,
.sp-more em {
  display: block;
  padding: 6px 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-more strong { font-size: 0.85rem; }
.sp-more em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--cf-muted);
  padding-bottom: 6px;
}
.sp-more-empty p {
  margin: 0 0 12px;
  color: var(--cf-muted);
}

.sp-copy { margin-top: 0; max-width: none; }

.sp-faq {
  margin-top: 0;
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-radius);
  box-shadow: var(--cf-shadow);
  overflow: hidden;
}
.sp-faq h2 {
  margin: 0;
  padding: 18px 20px 12px;
  font-size: 1.12rem;
}
.sp-faq details {
  border-top: 1px solid var(--cf-line);
}
.sp-faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.95rem;
}
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary::after {
  content: "";
  flex: 0 0 8px;
  height: 8px;
  margin-top: -3px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.sp-faq details[open] summary::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}
.sp-faq p {
  margin: 0;
  padding: 0 20px 16px;
  color: var(--cf-muted);
  font-size: 0.95rem;
  max-width: 52rem;
}
