.sp-page {
  --sp-ink: var(--w-ink, #121416);
  --sp-secondary: var(--w-slate, #565d66);
  --sp-rule: var(--w-line, #dce1e5);
  --sp-paper: var(--w-surface, #f2f4f6);
  color: var(--sp-ink);
  background: #fff;
}
.sp-page [hidden] { display: none !important; }
.sp-page .sp-icon { display: block; width: 20px; height: 20px; flex: 0 0 auto; }
.sp-page :focus-visible { outline: 2px solid #167442; outline-offset: 3px; }
.sp-crumb {
  display: flex;
  align-items: center;
  gap: .52rem;
  padding-block: 1.4rem .3rem;
  font-size: .79rem;
  font-weight: 500;
  color: var(--sp-secondary);
}
.sp-crumb a { color: inherit; text-decoration: none; }
.sp-crumb a:hover, .sp-toc a:hover { color: var(--sp-ink); text-decoration: underline; text-underline-offset: .2em; }
.sp-page .sp-crumb .sp-icon { width: 12px; height: 12px; }
.sp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, .43fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 8rem);
  padding-block: clamp(2.1rem, 3.2vw, 3.45rem) clamp(2.3rem, 3.7vw, 4rem);
}
.sp-intro { min-width: 0; }
.sp-hero h1, .sp-article-head h1 {
  margin: 0;
  color: var(--sp-ink);
  font-size: clamp(3rem, 4.8vw, 5rem);
  font-weight: 580;
  letter-spacing: -.05em;
  line-height: 1.03;
  text-wrap: balance;
}
.sp-intro > p, .sp-article-head > p {
  margin-top: 1rem;
  color: var(--sp-secondary);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: -.017em;
  text-wrap: pretty;
}
.sp-search { width: 100%; max-width: 43rem; margin: clamp(1.5rem, 2.8vw, 2.5rem) 0 0; }
.sp-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.sp-input {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 58px;
  padding: .35rem .35rem .35rem 1rem;
  border: 1.25px solid #717b84;
  border-radius: .6rem;
  background: #fff;
}
.sp-input:focus-within { outline: 2px solid #167442; outline-offset: 1px; }
.sp-input input { flex: 1; min-width: 0; background: transparent; padding: .55rem 0; color: var(--sp-ink); border: none; font: inherit; line-height: 1.4; }
.sp-input input:focus { outline: none; }
.sp-input input::placeholder { color: #5c6872; opacity: 1; }
.sp-input input::-webkit-search-cancel-button { display: none; }
.sp-submit { align-self: stretch; min-height: 42px; min-width: 74px; padding: .52rem 1rem; border: 0; border-radius: .35rem; background: var(--sp-ink); color: white; font: inherit; font-size: .88rem; font-weight: 560; }
.sp-submit:hover { background: #343b42; }
.sp-clear { display: grid; place-items: center; flex: none; width: 30px; height: 38px; padding: 0; border: 0; background: transparent; color: var(--sp-secondary); }
.sp-clear:hover { color: var(--sp-ink); }
.sp-quick { display:block; min-width:0; align-self:center; padding:1.15rem 1.25rem 1.1rem; border:1px solid var(--sp-rule); border-radius:.6rem; color:var(--sp-ink); background:var(--sp-paper); }
.sp-quick h2 { margin:0 0 .45rem; color:var(--sp-ink); font-size:1.03rem; font-weight:650; letter-spacing:-.03em; }
.sp-quick a { display:flex; align-items:center; justify-content:space-between; gap:1rem; min-height:40px; padding:.45rem 0; border-top:1px solid var(--sp-rule); color:var(--sp-ink); text-decoration:none; font-size:.9rem; font-weight:520; line-height:1.35; }
.sp-quick a:hover span,.sp-result:hover strong { text-decoration:underline; text-underline-offset:.2em; }
.sp-quick a .sp-icon { width:16px; height:16px; color:var(--sp-secondary); }
.sp-meta { font-size:.78rem; font-weight:540; color:var(--sp-secondary); }
.sp-directory { background: var(--sp-paper); border-top: 1px solid var(--sp-rule); padding-block: clamp(2rem, 3.8vw, 4rem) clamp(3.3rem, 6vw, 6.5rem); }
.sp-categories h2 { margin: 0 0 .85rem; font-size: .88rem; color: var(--sp-secondary); font-weight: 570; }
.sp-cat-list { display: flex; flex-wrap: wrap; gap: .55rem; }
.sp-cat-list button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .57rem;
  min-height: 44px;
  padding: .62rem .95rem;
  border: 1px solid #bac3cb;
  border-radius: .45rem;
  color: var(--sp-ink);
  background: #fff;
  font: inherit;
  font-size: .94rem;
  font-weight: 530;
}
.sp-cat-list button:hover { border-color: #444e57; }
.sp-cat-list button[aria-pressed=true] { border-color: var(--sp-ink); background: var(--sp-ink); color: white; }
.sp-cat-list .sp-icon { width: 18px; height: 18px; }
.sp-list-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: clamp(2.2rem, 3vw, 3rem); padding-bottom: .85rem; border-bottom: 2px solid #30363a; }
.sp-list-heading h2, .sp-empty h3, .sp-prose h2 { margin: 0; font-size: clamp(1.5rem, 2.35vw, 2.12rem); font-weight: 590; line-height: 1.15; letter-spacing: -.049em; }
#sp-heading { scroll-margin-top: 6rem; }
.sp-count { font-size: .81rem; color: var(--sp-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-result-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(1.6rem, 5vw, 5.5rem); margin: 0; padding: 0; list-style: none; }
.sp-result-list li { border-bottom: 1px solid var(--sp-rule); }
.sp-result { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: start; padding: 1.45rem 0 1.55rem; color: var(--sp-ink); text-decoration: none; }
.sp-result-icon { display: none; }
.sp-result-copy { display: flex; flex-direction: column; align-items: flex-start; gap: .34rem; }
.sp-result-copy strong { max-width: 36ch; font-size: clamp(1.05rem, 1.55vw, 1.45rem); font-weight: 610; line-height: 1.25; letter-spacing: -.036em; }
.sp-result-desc { display: block; max-width: 49ch; font-size: .92rem; color: var(--sp-secondary); line-height: 1.52; }
.sp-result-arrow { padding-top: 1.55rem; color: #58636b; }
.sp-empty { padding-block: 2.5rem; }
.sp-empty p { margin: .7rem 0 1.25rem; color: var(--sp-secondary); }
.sp-reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 44rem) minmax(13rem, 18rem);
  grid-template-areas: "head side" "body side";
  align-items: start;
  justify-content: space-between;
  column-gap: clamp(2rem, 7vw, 9.5rem);
  width: min(100%, 74rem);
  margin-inline: auto;
  padding-block: clamp(2.35rem, 4vw, 4.3rem) clamp(3rem, 6vw, 7rem);
}
.sp-article-head { grid-area: head; min-width: 0; padding: 0 0 clamp(1.7rem, 3vw, 2.8rem); margin-bottom: clamp(2rem, 3.7vw, 3.4rem); border-bottom: 2px solid var(--sp-ink); }
.sp-section-link { display: inline-flex; gap: .47rem; align-items: center; margin-bottom: 1.1rem; padding-bottom: .23rem; color: var(--sp-ink); border-bottom: 1px solid #8c969e; text-decoration: none; font-size: .84rem; font-weight: 540; }
.sp-section-link:hover { border-bottom-color: var(--sp-ink); }
.sp-section-link .sp-icon { width: 16px; height: 16px; }
.sp-article-head h1 { font-size: clamp(2.5rem, 4.35vw, 4.5rem); }
.sp-article-head > p { font-size: clamp(1.04rem, 1.28vw, 1.22rem); }
.sp-sidebar { position: sticky; top: 6rem; grid-area: side; min-width: 0; background: var(--sp-paper); border-top: 2px solid var(--sp-ink); }
.sp-toc-fold { padding: .9rem clamp(.8rem, 1.4vw, 1.35rem); }
.sp-toc-fold summary { display: flex; justify-content: space-between; align-items: center; gap: .8rem; min-height: 40px; font-size: 1rem; font-weight: 620; cursor: pointer; list-style: none; }
.sp-toc-fold summary::-webkit-details-marker { display: none; }
.sp-toc-fold summary .sp-icon { width: 17px; height: 17px; }
.sp-toc-fold[open] summary .sp-icon { transform: rotate(180deg); }
.sp-toc { display: grid; padding: .38rem 0 .1rem; }
.sp-toc a { display: block; padding: .53rem 0 .54rem .72rem; color: var(--sp-secondary); font-size: .88rem; line-height: 1.4; border-left: 1px solid #cbd2d7; text-decoration: none; }
.sp-toc a[aria-current=location] { color: var(--sp-ink); font-weight: 620; border-left: 2px solid var(--sp-ink); }
.sp-prepare { margin: .1rem clamp(.8rem, 1.4vw, 1.35rem) 0; padding: 1.1rem 0 1.4rem; border-top: 1px solid var(--sp-rule); }
.sp-prepare h2 { margin: 0 0 .4rem; color: var(--sp-ink); font-size: .88rem; font-weight: 650; }
.sp-prepare p { color: var(--sp-secondary); font-size: .86rem; line-height: 1.5; }
.sp-prose { grid-area: body; min-width: 0; color: var(--sp-ink); }
.sp-prose section { scroll-margin-top: 6rem; margin: 0 0 clamp(2rem, 3.45vw, 3.25rem); }
.sp-prose section:focus { outline: none; }
.sp-prose h2 { margin-bottom: .9rem; }
.sp-prose p, .sp-prose li { color: #353d43; font-size: clamp(1.02rem, 1.22vw, 1.14rem); line-height: 1.72; letter-spacing: -.012em; }
.sp-prose p + p { margin-top: .9rem; }
.sp-prose ol { margin: 0; padding-left: 1.57rem; }
.sp-prose li { padding-left: .3rem; }
.sp-prose li + li { margin-top: .7rem; }
.sp-prose li::marker { color: var(--sp-ink); font-weight: 630; font-variant-numeric: tabular-nums; }
.sp-sources { padding: 1.4rem 0 1.75rem; border-top: 1px solid var(--sp-rule); }
.sp-related { padding: 1.25rem clamp(.9rem, 2vw, 1.7rem) 1.5rem; border-top: 1px solid var(--sp-rule); background: var(--sp-paper); }
.sp-sources h2, .sp-related h2 { font-size: 1.03rem; letter-spacing: -.025em; }
.sp-sources a, .sp-related a { display: flex; align-items: center; width: fit-content; gap: .45rem; padding: .38rem 0; color: var(--sp-ink); font-size: .92rem; line-height: 1.45; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.sp-page .sp-sources .sp-icon, .sp-page .sp-related .sp-icon { width: 14px; height: 14px; }
@media (max-width: 850px) {
  .sp-hero { grid-template-columns: minmax(0, 1fr) minmax(13rem, .43fr); gap: 1.5rem; }
  .sp-reading-grid { grid-template-columns: minmax(0, 1fr) minmax(12rem, .38fr); gap: 0 1.55rem; }
}
@media (max-width: 680px) {
  .sp-hero { grid-template-columns: 1fr; gap: 1.45rem; padding-block: 1.85rem 1.8rem; }
  .sp-search { margin-top: 1.3rem; max-width: none; }
  .sp-list-heading { margin-top: 1.65rem; }
  .sp-result-list { grid-template-columns: 1fr; }
  .sp-results + .sp-quick { margin-top:1.75rem; }
  .sp-reading-grid { grid-template-columns: minmax(0,1fr); grid-template-areas: "head" "side" "body"; gap: 1.5rem; padding-top: 1.85rem; }
  .sp-article-head { margin: 0; padding-bottom: 0; border: 0; }
  .sp-sidebar { position: static; }
  .sp-toc-fold { padding: .35rem .85rem; }
  .sp-toc { padding-bottom: .5rem; }
  .sp-prepare { padding: .75rem 0 .85rem; }
}
@media (max-width: 420px) {
  .sp-crumb { padding-top: 1rem; }
  .sp-hero h1 { font-size: clamp(2.4rem, 9.8vw, 2.92rem); }
  .sp-article-head h1 { font-size: clamp(2.1rem, 8.7vw, 2.5rem); }
  .sp-input { min-height: 52px; gap: .45rem; padding-left: .66rem; }
  .sp-input > .sp-icon { width: 17px; height: 17px; }
  .sp-input input { font-size: .9rem; }
  .sp-submit { min-width: 50px; min-height: 38px; padding: .45rem .57rem; }
  .sp-clear { width: 23px; }
  .sp-cat-list { gap: .4rem; }
  .sp-cat-list button { min-height: 40px; padding: .45rem .74rem; font-size: .84rem; gap: .38rem; }
  .sp-cat-list .sp-icon { width: 16px; height: 16px; }
  .sp-result { padding: 1.1rem 0; }
}
