:root {
  --sp-header-height: 58px;
  --sp-contents-height: 0px;
}

.page-copy .sp-editorial-list {
  display: grid !important;
}

.detail-grid {
  align-items: start;
  width: 100%;
}

.detail-grid details {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sp-icon {
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  vertical-align: middle;
  width: 18px;
}

.sp-sr-only {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.sp-contents [hidden],
.sp-directory-tools [hidden],
.sp-table-tools [hidden],
.sp-interactive-table [hidden],
.sp-directory-grid > [hidden],
.sp-back-top[hidden] {
  display: none !important;
}

.sp-contents button,
.sp-icon-button,
.sp-sort-button,
.sp-clear-search {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  justify-content: center;
}

.sp-contents :focus-visible,
.sp-directory-tools :focus-visible,
.sp-table-tools :focus-visible,
.sp-sort-button:focus-visible,
.sp-checklist :focus-visible,
.sp-check-toolbar :focus-visible,
.sp-back-top:focus-visible,
.sp-coverage-link:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.sp-anchor {
  scroll-margin-top: calc(var(--sp-header-height) + var(--sp-contents-height) + 24px);
}

.sp-reading-layout {
  align-items: start;
  display: grid;
  gap: 44px;
  grid-template-columns: 248px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1400px;
  padding: 0 24px 24px;
}

.sp-reading-body {
  min-width: 0;
}

.sp-reading-body > .text-section,
.sp-reading-body > .faq-section,
.sp-reading-body > .use-guide {
  padding-left: 0;
  padding-right: 0;
}

.sp-contents {
  align-self: start;
  border-right: 1px solid var(--line);
  margin-top: 38px;
  min-width: 0;
  padding-right: 20px;
  position: sticky;
  text-align: left;
  top: calc(var(--sp-header-height) + 24px);
  z-index: 18;
}

.sp-contents .sp-contents-toggle,
.sp-contents .sp-contents-close {
  display: none;
}

.sp-contents-heading {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 850;
  justify-content: space-between;
  min-height: 24px;
}

.sp-contents-status {
  color: var(--muted);
  display: flex;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  justify-content: space-between;
  margin-top: 8px;
}

.sp-contents-percent {
  color: var(--orange);
}

.sp-contents-panel {
  min-width: 0;
}

.sp-contents-menu {
  margin-top: 14px;
  max-height: calc(100dvh - var(--sp-header-height) - 142px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 8px 8px 0;
  scrollbar-color: #d4d4d4 transparent;
  scrollbar-width: thin;
}

.sp-contents-menu ol {
  display: block !important;
  margin: 0;
  max-width: none;
  padding: 0;
  width: 100%;
}

.sp-contents-menu li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 4px;
  padding: 0 !important;
}

.sp-contents-menu a {
  align-items: baseline;
  border-left: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  display: flex;
  gap: 9px;
  padding: 8px 8px;
}

.sp-toc-number {
  color: #777;
  flex: 0 0 17px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.sp-toc-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sp-toc-chapter > a {
  font-weight: 650;
}

.sp-contents-menu .sp-toc-chapter > ol {
  border-left: 1px solid var(--line);
  margin: 0 0 10px 18px;
  width: calc(100% - 18px);
}

.sp-contents-menu .sp-toc-subsection {
  font-size: 12px;
  margin-bottom: 0;
}

.sp-toc-subsection a {
  padding: 6px 10px;
}

.sp-toc-active-chapter > a {
  color: var(--ink);
}

.sp-contents-menu a:hover,
.sp-contents-menu a[aria-current="location"] {
  background: #f0f9f6;
  border-left-color: var(--orange);
  color: var(--ink);
}

.sp-contents-menu a[aria-current="location"] .sp-toc-number {
  color: var(--orange);
}

.sp-reading-progress {
  appearance: none;
  background: var(--line);
  border: 0;
  color: var(--orange);
  display: block;
  height: 3px;
  margin-top: 9px;
  width: 100%;
}

.sp-reading-progress::-webkit-progress-bar {
  background: var(--line);
}

.sp-reading-progress::-webkit-progress-value {
  background: var(--orange);
}

.sp-reading-progress::-moz-progress-bar {
  background: var(--orange);
}

.sp-back-top {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  bottom: 22px;
  box-shadow: 0 4px 16px rgb(23 23 23 / 8%);
  color: var(--orange);
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  position: fixed;
  right: 22px;
  width: 44px;
  z-index: 17;
}

.sp-coverage-link {
  align-items: center;
  background: var(--soft);
  border: 1px solid #eadfd6;
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
  line-height: 1.2;
  padding: 8px 12px;
}

.sp-coverage-link .sp-icon {
  color: var(--orange);
  height: 14px;
  width: 14px;
}

.sp-coverage-link:hover {
  background: var(--mint);
  border-color: var(--mint);
}

.sp-directory-tools,
.sp-table-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  text-align: left;
}

.sp-directory-tools {
  margin: 0 auto 20px;
  max-width: 1360px;
}

.sp-directory-tools .sp-search-field {
  flex: 0 1 460px;
}

.sp-search-field {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 10px;
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
}

.sp-search-field:focus-within {
  border-color: var(--orange);
}

.sp-search-field > .sp-icon {
  color: var(--muted);
}

.sp-search-field input {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  min-width: 0;
  outline: 0;
  padding: 10px 0;
  width: 100%;
}

.sp-search-field input::-webkit-search-cancel-button {
  appearance: none;
}

.sp-search-field .sp-clear-search {
  flex: 0 0 30px;
  height: 36px;
  width: 30px;
}

.sp-directory-tools select {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  min-height: 44px;
  padding: 8px 10px;
}

.sp-result-count {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  white-space: nowrap;
}

.sp-empty {
  color: var(--muted);
  font-size: 15px;
  grid-column: 1 / -1;
  padding: 24px 0;
  text-align: center;
}

.sp-table-tools {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.sp-table-tools .sp-search-field {
  flex: 0 1 340px;
  min-height: 40px;
}

.sp-table-shell {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--orange) var(--soft);
  scrollbar-width: thin;
  width: 100%;
}

.sp-interactive-table {
  background: var(--paper);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.sp-interactive-table .sp-sort-button {
  font-size: inherit;
  font-weight: inherit;
  gap: 10px;
  justify-content: space-between;
  min-height: 36px;
  padding: 0;
  text-align: left;
  width: 100%;
}

.sp-sort-button .sp-icon {
  color: var(--muted);
  height: 15px;
  opacity: 0.7;
  width: 15px;
}

.sp-interactive-table th[aria-sort="ascending"],
.sp-interactive-table th[aria-sort="descending"] {
  background: #e9f6f1;
  color: var(--ink);
}

.sp-interactive-table th[aria-sort] .sp-icon {
  color: var(--orange);
  opacity: 1;
}

.sp-interactive-table tbody tr:hover td {
  background: #f0f9f6;
}

.sp-interactive-table .sp-empty td {
  padding: 24px 16px;
  text-align: center;
}

.table-card.sp-simple-table {
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: none;
}

.sp-simple-table th {
  font-weight: 700;
  padding: 12px 14px;
}

.sp-simple-table td {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  padding: 11px 14px;
}

.sp-simple-table td:first-child {
  font-weight: 700;
}

.sp-network-table {
  margin-top: 18px;
}

.sp-network-table td:first-child {
  width: 26%;
}

.sp-brand-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sp-brand-list span {
  background: #eef8f4;
  border: 1px solid #d8ece3;
  border-radius: 4px;
  color: var(--ink);
  display: inline-block;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  padding: 5px 8px;
}

.sp-check-toolbar {
  align-items: center;
  display: flex;
  gap: 14px;
  margin: 12px auto 0;
  max-width: 900px;
  min-width: 0;
  text-align: left;
  width: 100%;
}

.sp-check-toolbar output {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sp-check-toolbar progress {
  accent-color: var(--orange);
  flex: 1;
  height: 5px;
  min-width: 0;
}

.sp-icon-button {
  border: 1px solid var(--line);
  border-radius: 5px;
  flex: 0 0 40px;
  height: 40px;
  width: 40px;
}

.sp-icon-button:disabled {
  cursor: default;
  opacity: 0.4;
}

.text-section .sp-checklist {
  display: grid !important;
  gap: 0 30px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
  max-width: 900px;
  min-width: 0;
}

.text-section .sp-checklist li {
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
  min-width: 0;
  padding: 0;
}

.sp-checklist label {
  align-items: center;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 15px;
  gap: 12px;
  min-height: 58px;
  min-width: 0;
  padding: 12px 0;
}

.sp-checklist label > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sp-checklist input {
  accent-color: var(--orange);
  cursor: pointer;
  flex: 0 0 18px;
  height: 18px;
  margin: 0;
  width: 18px;
}

.sp-checklist input:checked + span {
  color: var(--muted);
}

@media (max-width: 1099px) {
  .sp-reading-layout {
    display: block;
    padding: 0 22px 20px;
  }

  .sp-contents {
    background: var(--paper);
    border: 0;
    margin-top: 0;
    padding: 8px 0;
    top: var(--sp-header-height);
  }

  .sp-contents .sp-contents-toggle {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 5px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 750;
    gap: 10px;
    min-height: 40px;
    padding: 8px 12px;
  }

  .sp-contents-toggle > .sp-icon:first-child {
    color: var(--orange);
  }

  .sp-contents-backdrop {
    background: rgb(23 23 23 / 24%);
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    top: var(--sp-header-height);
    z-index: 30;
  }

  .sp-contents-panel {
    background: var(--paper);
    border-right: 1px solid var(--line);
    bottom: 0;
    box-shadow: 14px 0 40px rgb(23 23 23 / 12%);
    display: flex;
    flex-direction: column;
    left: 0;
    padding: 18px 20px;
    position: fixed;
    top: var(--sp-header-height);
    width: min(340px, calc(100vw - 32px));
    z-index: 31;
  }

  .sp-contents-heading {
    font-size: 16px;
    flex: 0 0 auto;
  }

  .sp-contents .sp-contents-close {
    display: inline-flex;
    height: 36px;
    margin-right: -8px;
    width: 36px;
  }

  .sp-contents-status,
  .sp-reading-progress {
    flex: 0 0 auto;
  }

  .sp-contents-menu {
    flex: 1;
    max-height: none;
    min-height: 0;
    padding-right: 4px;
  }

  .sp-contents-menu li {
    font-size: 13px;
  }

  .sp-contents-menu .sp-toc-subsection {
    font-size: 12px;
  }
}

@media (max-width: 700px) {
  .sp-reading-layout {
    padding-left: 12px;
    padding-right: 12px;
  }

  .sp-directory-tools {
    gap: 10px;
    margin-bottom: 16px;
  }

  .sp-directory-tools .sp-search-field {
    flex-basis: 100%;
  }

  .sp-table-tools {
    gap: 8px;
    padding: 10px;
  }

  .sp-table-tools .sp-search-field {
    flex-basis: 100%;
  }

  .sp-table-tools .sp-result-count {
    font-size: 11px;
    margin-left: 0;
  }

  .table-card.sp-interactive-table {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
  }

  .table-card.sp-interactive-table table {
    border-collapse: collapse;
    display: table;
    min-width: 560px;
    width: 100%;
  }

  .table-card.sp-interactive-table thead {
    display: table-header-group;
  }

  .table-card.sp-interactive-table tbody {
    display: table-row-group;
  }

  .table-card.sp-interactive-table tr {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: table-row;
    margin: 0;
  }

  .table-card.sp-interactive-table th,
  .table-card.sp-interactive-table td {
    display: table-cell;
    font-size: 12px;
    padding: 10px 12px;
    text-align: left;
    width: auto;
  }

  .table-card.sp-interactive-table td:first-child,
  .table-card.sp-interactive-table th:first-child {
    background: #f6f2ee;
    border-right: 1px solid var(--line);
    left: 0;
    max-width: 140px;
    min-width: 110px;
    position: sticky;
    width: 140px;
    z-index: 1;
  }

  .sp-brand-list span {
    font-size: 11px;
    padding: 4px 6px;
  }

  .text-section .sp-checklist {
    grid-template-columns: minmax(0, 1fr);
  }

  .sp-back-top {
    bottom: 16px;
    right: 12px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .sp-reveal.sp-is-visible {
    animation: sp-enter 420ms ease-out both;
  }

  .faq-list details[open] p {
    animation: sp-enter 220ms ease-out both;
  }

  @keyframes sp-enter {
    from { opacity: 0.65; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .sp-contents *, .sp-reveal, .faq-list details p { animation: none !important; transition: none !important; }
}

@media print {
  .sp-reading-layout { display: block; padding: 0; }
  .sp-contents, .sp-back-top, .sp-directory-tools, .sp-table-tools, .sp-check-toolbar { display: none !important; }
  .sp-directory-grid > [hidden], .sp-interactive-table tbody tr[hidden] { display: revert !important; }
  .sp-table-shell { overflow: visible; }
}
