.sv-page,
.sv-page *,
.sv-page *::before,
.sv-page *::after {
  box-sizing: border-box;
}

.sv-page {
  /* Match the fixed navigation heights in styles.css. */
  --sv-header-height: 90px;
  padding-top: var(--sv-header-height);
  background: var(--white);
  color: var(--text-mid);
  font-family: 'Inter', sans-serif;
  line-height: 1.55;
}

.sv-page .sv-category,
.sv-page .sv-row {
  scroll-margin-top: calc(var(--sv-header-height) + 16px);
}

.sv-page [hidden] {
  display: none !important;
}

.sv-page .sv-wrap {
  width: min(970px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.sv-page .sv-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #f8faff;
  color: var(--navy);
}

.sv-page .sv-hero-inner {
  position: relative;
  display: block;
  padding: 30px 0 15px;
}

.sv-page .sv-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sv-page .sv-eyebrow::after {
  width: 64px;
  height: 1px;
  background: var(--primary);
  content: "";
}

.sv-page .sv-title {
  margin: 10px 0 0;
  color: var(--navy);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.15;
}

.sv-page .sv-title em {
  display: block;
  color: var(--primary);
  font-style: normal;
}

.sv-page .sv-search {
  position: relative;
  width: 100%;
  max-width: 423px;
  margin-top: 16px;
}

.sv-page .sv-search svg {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-width: 2;
  pointer-events: none;
}

.sv-page .sv-search input {
  width: 100%;
  height: 46px;
  padding: 0 48px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 6px 20px rgba(37, 65, 122, 0.08);
  color: var(--navy);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sv-page .sv-search input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.sv-page .sv-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(56, 102, 176, 0.15);
}

.sv-page .sv-clear {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  isolation: isolate;
}

.sv-page .sv-clear::before {
  position: absolute;
  z-index: -1;
  inset: 6px;
  border-radius: 50%;
  background: var(--soft-bg);
  content: "";
}

.sv-page .sv-clear:hover::before {
  background: var(--light-tint);
}

.sv-page .sv-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.sv-page .sv-explore {
  display: grid;
  width: min(970px, calc(100% - 48px));
  max-width: 970px;
  grid-template-columns: 227px minmax(0, 1fr);
  align-items: start;
  gap: 38px;
  padding-top: 30px;
  padding-bottom: 48px;
}

.sv-page .sv-tabs {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px 9px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8faff;
}

.sv-page .sv-tab {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-left: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--white);
  box-shadow: none;
  color: var(--navy);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.sv-page .sv-tab svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.sv-page .sv-tab > span:first-of-type {
  flex: 1;
}

.sv-page .sv-tab > i {
  font-size: 20px;
  font-style: normal;
  transition: transform 0.2s ease;
}

.sv-page .sv-tab:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(10, 25, 50, 0.1);
}

.sv-page .sv-tab:hover > i {
  transform: translateX(3px);
}

.sv-page .sv-tab[aria-selected="true"] {
  border-color: var(--navy);
  border-left-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.sv-page .sv-tab[aria-selected="true"] .sv-tab-count {
  background: var(--light-tint);
  color: var(--navy);
}

.sv-page .sv-tab[data-dim] {
  color: var(--text-muted);
}

.sv-page .sv-tab-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  place-items: center;
  border-radius: 99px;
  background: var(--soft-bg);
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
}

.sv-page .sv-main {
  min-width: 0;
  max-width: 780px;
}

.sv-page .sv-rule {
  display: block;
  width: 54px;
  height: 2px;
  margin-bottom: 18px;
  background: var(--primary);
}

.sv-page .sv-category-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.sv-page .sv-category-title,
.sv-page .sv-empty-state h2 {
  margin: 0;
  color: var(--navy);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.15;
}

.sv-page .sv-intro {
  margin: 0 0 22px;
  color: var(--text-mid);
  font-size: 13px;
}

.sv-page .sv-row {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.sv-page .sv-row.sv-open {
  margin: 22px 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--soft-bg);
}

.sv-page .sv-row-heading {
  margin: 0;
}

.sv-page .sv-row-toggle {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  gap: 14px;
  padding: 13px 17px;
  border: 0;
  border-radius: 11px 11px 0 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.sv-page .sv-row-title {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.sv-page .sv-row-toggle > i {
  flex: none;
  font-size: 18px;
  font-style: normal;
  transition: transform 0.25s ease;
}

.sv-page .sv-row.sv-open .sv-row-toggle > i {
  transform: rotate(180deg);
}

.sv-page .sv-row-panel {
  padding: 2px 17px 18px;
  animation: sv-fade 0.3s ease;
}

.sv-page .sv-row-panel > p:first-child {
  margin: 0 0 14px;
  color: var(--text-mid);
  font-size: 14.5px;
  line-height: 1.7;
}

.sv-page .sv-check-list {
  display: grid;
  gap: 9px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.sv-page .sv-check-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--navy);
  font-size: 14.5px;
  font-weight: 500;
}

.sv-page .sv-check-list li::before {
  display: grid;
  width: 20px;
  height: 20px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  content: "✓";
  font-size: 11px;
  font-weight: 700;
}

.sv-page .sv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sv-page .sv-actions .sv-button {
  min-height: 44px;
  gap: 8px;
  padding: 0 20px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 700;
}

.sv-page .sv-empty-state {
  padding: 30px 0;
}

.sv-page .sv-empty-state h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.sv-page .sv-empty-state p {
  margin: 0;
  color: var(--text-mid);
}

.sv-page .sv-empty-state a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sv-page :focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

.sv-page .sv-search input:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

@keyframes sv-fade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@media (max-width: 1020px) {
  .sv-page .sv-explore {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 850px) {
  .sv-page {
    --sv-header-height: 80px;
  }
}

@media (max-width: 780px) {
  .sv-page .sv-wrap {
    width: calc(100% - 32px);
  }

  .sv-page .sv-hero-inner {
    padding: 22px 0 2px;
  }

  .sv-page .sv-search {
    max-width: none;
  }

  .sv-page .sv-explore {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-top: 20px;
    padding-bottom: 32px;
  }

  .sv-page .sv-tabs {
    padding: 0 16px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .sv-page .sv-tabs {
    position: relative;
    display: flex;
    overflow-x: auto;
    gap: 8px;
    margin: 0 -16px;
    padding: 4px 16px 10px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .sv-page .sv-tabs::-webkit-scrollbar {
    display: none;
  }

  .sv-page .sv-tab {
    width: auto;
    min-height: 44px;
    flex: none;
    padding: 0 16px;
    border-left-width: 1px;
    border-radius: 99px;
    box-shadow: none;
    font-size: 14px;
    white-space: nowrap;
    scroll-snap-align: center;
  }

  .sv-page .sv-tab svg,
  .sv-page .sv-tab > i {
    display: none;
  }

  .sv-page .sv-tab:hover {
    transform: none;
  }

  .sv-page .sv-tab[aria-selected="true"] {
    border-left-color: var(--navy);
  }

  .sv-page .sv-main {
    min-height: 0;
  }

  .sv-page .sv-category-heading {
    align-items: flex-start;
  }

  .sv-page .sv-row-toggle {
    min-height: 56px;
    padding: 12px;
    font-size: 15px;
  }

  .sv-page .sv-row-panel {
    padding: 2px 12px 18px;
  }

  .sv-page .sv-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .sv-page .sv-actions .sv-button {
    min-height: 48px;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .sv-page .sv-wrap {
    width: calc(100% - 24px);
  }

  .sv-page .sv-tabs {
    margin: 0 -12px;
    padding: 4px 12px 10px;
  }

  .sv-page .sv-title {
    font-size: 23px;
  }

  .sv-page .sv-row.sv-open {
    margin: 4px -4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sv-page *,
  .sv-page *::before,
  .sv-page *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
