/**
 * Shamshub platform design system — tokens, Bootstrap tuning, layout primitives.
 * Loaded after Bootstrap; keep tool-specific logic out of this file.
 */

:root {
    --sh-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --sh-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    --sh-color-bg: #ffffff;
    --sh-color-bg-subtle: #f8fafc;
    --sh-color-bg-muted: #f1f5f9;
    --sh-color-border: #e2e8f0;
    --sh-color-border-strong: #cbd5e1;
    --sh-color-text: #0f172a;
    --sh-color-text-secondary: #475569;
    --sh-color-muted: #64748b;
    --sh-color-accent: #1e40af;
    --sh-color-accent-hover: #1d4ed8;
    --sh-color-accent-subtle: #eff6ff;

    --sh-success: #047857;
    --sh-success-bg: #ecfdf5;
    --sh-warning: #b45309;
    --sh-warning-bg: #fffbeb;
    --sh-danger: #b91c1c;
    --sh-danger-bg: #fef2f2;

    --sh-radius-sm: 0.375rem;
    --sh-radius-md: 0.5rem;
    --sh-radius-lg: 0.75rem;
    --sh-radius-xl: 1rem;

    --sh-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --sh-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --sh-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.07), 0 2px 4px rgba(15, 23, 42, 0.04);
    --sh-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);

    --sh-space-section: 4.5rem;
    --sh-space-block: 2rem;
    --sh-container-max: 1200px;

    --bs-primary: #1e40af;
    --bs-primary-rgb: 30, 64, 175;
    --bs-link-color: var(--sh-color-accent);
    --bs-link-hover-color: var(--sh-color-accent-hover);
    --bs-focus-ring-color: rgba(30, 64, 175, 0.28);
    --bs-border-color: var(--sh-color-border);
    --bs-body-color: var(--sh-color-text);
    --bs-body-bg: var(--sh-color-bg);
    --bs-secondary-color: var(--sh-color-muted);
}

@media (min-width: 1200px) {
    :root {
        --sh-space-section: 5.5rem;
    }
}

body.sh-page {
    font-family: var(--sh-font-sans);
    -webkit-font-smoothing: antialiased;
}

/* —— Lite / public feasibility banner —— */
.sh-lite-banner {
    background: var(--sh-color-bg-subtle);
    border-bottom: 1px solid var(--sh-color-border);
    color: var(--sh-color-text-secondary);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.sh-lite-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.85rem;
    padding-block: 0.55rem;
}

.sh-lite-banner__label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sh-color-accent);
    background: var(--sh-color-accent-subtle);
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-sm);
    padding: 0.2rem 0.45rem;
}

.sh-lite-banner__text {
    flex: 1 1 14rem;
    min-width: 0;
}

.sh-lite-banner__warn {
    flex: 1 1 100%;
    color: var(--sh-warning);
    font-size: 0.75rem;
}

.sh-lite-banner__warn code {
    font-size: 0.7rem;
}

.min-w-0 {
    min-width: 0;
}

/* —— Typography scale —— */
.sh-display {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--sh-color-text);
}

.sh-page-title {
    font-size: clamp(1.75rem, 3vw, 2.125rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--sh-color-text);
}

.sh-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--sh-color-text);
}

.sh-card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--sh-color-text);
}

.sh-eyebrow {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
    margin-bottom: 0.5rem;
}

.sh-meta {
    font-size: 0.8125rem;
    color: var(--sh-color-muted);
    line-height: 1.5;
}

/* —— Layout shell —— */
.sh-page {
    background-color: var(--sh-color-bg);
}

.sh-container-tight {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.sh-container-narrow {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.sh-container-readable {
    max-width: var(--sh-container-max);
}

/* —— Navbar —— */
.sh-navbar {
    background: var(--sh-color-bg) !important;
    border-bottom: 1px solid var(--sh-color-border) !important;
    box-shadow: var(--sh-shadow-xs);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.sh-navbar .navbar-brand.sh-brand {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.03em;
    color: var(--sh-color-text) !important;
}

.sh-navbar .nav-link {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--sh-color-text-secondary) !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: var(--sh-radius-sm);
    transition: color 0.15s ease, background-color 0.15s ease;
}

.sh-navbar .nav-link:hover,
.sh-navbar .nav-link:focus {
    color: var(--sh-color-text) !important;
    background-color: var(--sh-color-bg-subtle);
}

.sh-navbar .nav-link.btn-link {
    color: var(--sh-color-text-secondary) !important;
}

/* —— Cards & surfaces —— */
.sh-card {
    background: var(--sh-color-bg);
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-lg);
    box-shadow: var(--sh-shadow-sm);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sh-card:hover.sh-card--hover {
    box-shadow: var(--sh-shadow-md);
    border-color: var(--sh-color-border-strong);
}

.sh-card-body {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .sh-card-body--lg {
        padding: 1.75rem 2rem;
    }
}

.sh-panel {
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-lg);
    background: var(--sh-color-bg);
    box-shadow: var(--sh-shadow-xs);
}

.sh-panel__head {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--sh-color-border);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
    background: var(--sh-color-bg-subtle);
    border-radius: var(--sh-radius-lg) var(--sh-radius-lg) 0 0;
}

.sh-panel__body {
    padding: 1.25rem;
}

/* —— Homepage hero —— */
.sh-hero {
    position: relative;
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-xl);
    background: var(--sh-color-bg);
    box-shadow: var(--sh-shadow-md);
    padding: 2.5rem 1.75rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .sh-hero {
        padding: 3rem 2.5rem;
    }
}

.sh-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.03) 0%, transparent 45%);
    border-radius: inherit;
}

.sh-hero .sh-hero__inner {
    position: relative;
    z-index: 1;
}

/* —— Tool page —— */
.sh-tool-header {
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--sh-color-border);
}

.sh-tool-header .sh-badge-row .badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: var(--sh-radius-sm);
}

.sh-back-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--sh-color-muted);
    text-decoration: none;
}

.sh-back-link:hover {
    color: var(--sh-color-accent);
}

.sh-workbench {
    border-radius: var(--sh-radius-lg);
    border: 1px solid var(--sh-color-border);
    box-shadow: var(--sh-shadow-sm);
    overflow: hidden;
}

.sh-workbench .card-body {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .sh-workbench .card-body {
        padding: 1.75rem;
    }
}

.sh-tool-toc-wrap {
    top: 5.5rem;
}

.sh-tool-toc {
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-lg);
    background: var(--sh-color-bg);
    box-shadow: var(--sh-shadow-xs);
    padding: 1rem 1.15rem;
}

.sh-tool-toc-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
    margin-bottom: 0.75rem;
}

.sh-tool-toc a {
    display: block;
    padding: 0.35rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sh-color-text-secondary);
    text-decoration: none;
    border-radius: var(--sh-radius-sm);
}

.sh-tool-toc a:hover {
    color: var(--sh-color-accent);
}

.sh-section {
    margin-top: 2.5rem;
}

.sh-section:first-of-type {
    margin-top: 0;
}

.sh-section-head {
    margin-bottom: 1rem;
}

/* —— Tool cards (catalog) —— */
.sh-tool-card {
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-color-border) !important;
    box-shadow: var(--sh-shadow-sm) !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sh-tool-card:hover {
    box-shadow: var(--sh-shadow-md) !important;
    border-color: var(--sh-color-border-strong) !important;
    transform: translateY(-2px);
}

.sh-tool-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--sh-radius-md);
    background: var(--sh-color-accent-subtle);
    color: var(--sh-color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sh-tool-card .badge {
    font-weight: 500;
    border-radius: var(--sh-radius-sm) !important;
}

/* Full tool name in card header (no single-line ellipsis beside category badge) */
.sh-tool-card__title {
    line-height: 1.35;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* —— Category chips —— */
.sh-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid var(--sh-color-border);
    background: var(--sh-color-bg);
    color: var(--sh-color-text-secondary);
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.sh-chip:hover {
    border-color: var(--sh-color-border-strong);
    background: var(--sh-color-bg-subtle);
    color: var(--sh-color-text);
}

/* —— Catalog search —— */
.sh-catalog-search {
    border: 1px solid var(--sh-color-border) !important;
    border-radius: var(--sh-radius-lg) !important;
    box-shadow: var(--sh-shadow-sm) !important;
}

.sh-catalog-search .form-control,
.sh-catalog-search .form-select {
    border-radius: var(--sh-radius-md);
    border-color: var(--sh-color-border);
}

.sh-catalog-search .form-control:focus,
.sh-catalog-search .form-select:focus {
    border-color: rgba(30, 64, 175, 0.45);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

/* —— Forms (global polish) —— */
.form-control,
.form-select {
    border-radius: var(--sh-radius-md);
    border-color: var(--sh-color-border);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(30, 64, 175, 0.45);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--sh-color-text);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #fca5a5;
}

/* —— Code / pre blocks —— */
.sh-pre {
    font-family: var(--sh-font-mono);
    font-size: 0.8125rem;
    line-height: 1.5;
    background: var(--sh-color-bg-muted) !important;
    border: 1px solid var(--sh-color-border) !important;
    border-radius: var(--sh-radius-md) !important;
    padding: 1rem !important;
}

/* —— Buttons —— */
.btn {
    border-radius: var(--sh-radius-md);
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.btn-sm {
    border-radius: var(--sh-radius-sm);
    font-weight: 600;
}

.btn-primary {
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25);
}

.btn.is-copied,
button.is-copied {
    background-color: var(--sh-success-bg) !important;
    border-color: #a7f3d0 !important;
    color: var(--sh-success) !important;
}

/* —— CTA band —— */
.sh-cta-band .card {
    border-radius: var(--sh-radius-lg);
    border: 1px solid var(--sh-color-border);
    box-shadow: var(--sh-shadow-sm);
}

/* —— Trust / feature strip —— */
.sh-trust-strip {
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-lg);
    background: var(--sh-color-bg);
    padding: 1.5rem 1.25rem;
}

.sh-trust-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.sh-trust-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--sh-radius-md);
    background: var(--sh-color-bg-subtle);
    color: var(--sh-color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* —— Auth —— */
.sh-auth-card {
    border-radius: var(--sh-radius-xl) !important;
    border: 1px solid var(--sh-color-border) !important;
    box-shadow: var(--sh-shadow-md) !important;
}

.sh-auth-card .card-body {
    padding: 2rem !important;
}

/* —— Pricing (wide shell; cards use .sh-billing-card like Billing) —— */
.sh-pricing-shell {
    max-width: 1120px;
}

/* —— FAQ block —— */
.sh-faq {
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-lg);
    background: var(--sh-color-bg);
    padding: 1.5rem 1.35rem;
}

.sh-faq-item + .sh-faq-item {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--sh-color-border);
}

/* —— Ad slot —— */
.sh-ad-slot {
    border: 1px dashed var(--sh-color-border-strong) !important;
    border-radius: var(--sh-radius-md) !important;
    background: var(--sh-color-bg-subtle) !important;
    color: var(--sh-color-muted) !important;
}

/* —— Footer (extends .site-footer) —— */
.site-footer__main {
    background: var(--sh-color-bg-subtle) !important;
}

.site-footer__bar {
    background: var(--sh-color-bg);
}

/* —— Breadcrumb —— */
.breadcrumb {
    font-size: 0.8125rem;
}

/* —— Main spacing —— */
main.py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 3rem !important;
}

@media (min-width: 992px) {
    main.py-5 {
        padding-top: 3rem !important;
        padding-bottom: 4rem !important;
    }
}

/* —— Conversion strip —— */
.sh-conversion-strip {
    border-radius: var(--sh-radius-lg);
    border: 1px solid var(--sh-color-border);
    background: var(--sh-color-bg-subtle);
    padding: 1rem 1.25rem;
}

/* —— Reduced motion —— */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }

    .sh-tool-card:hover {
        transform: none !important;
    }
}

/* =============================================================================
   Pass 2 — polish: de-Bootstrap public UI, premium SaaS consistency
   ============================================================================= */

/* Bootstrap variable alignment */
:root {
    --bs-border-radius: var(--sh-radius-md);
    --bs-border-radius-sm: var(--sh-radius-sm);
    --bs-border-radius-lg: var(--sh-radius-lg);
    --bs-border-radius-xl: var(--sh-radius-xl);
}

/* In-content links (not buttons / nav) */
body.sh-page main.py-5 a:not(.btn):not(.page-link):not(.nav-link):not(.breadcrumb-item a):not(.sh-chip):not(.site-footer__link):not(.sh-back-link) {
    text-decoration: none;
    font-weight: 500;
    color: var(--sh-color-accent);
}

body.sh-page main.py-5 a:not(.btn):not(.page-link):not(.nav-link):not(.breadcrumb-item a):not(.sh-chip):not(.site-footer__link):not(.sh-back-link):hover {
    color: var(--sh-color-accent-hover);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

body.sh-page main.py-5 .sh-tool-toc a {
    color: var(--sh-color-text-secondary);
    font-weight: 500;
    text-decoration: none;
}

body.sh-page main.py-5 .sh-tool-toc a:hover {
    color: var(--sh-color-accent);
    text-decoration: none;
}

/* Breadcrumb — minimal, not default gray pills */
body.sh-page .breadcrumb {
    --bs-breadcrumb-divider-color: var(--sh-color-border-strong);
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    font-weight: 500;
}

body.sh-page .breadcrumb-item a {
    color: var(--sh-color-muted);
}

body.sh-page .breadcrumb-item a:hover {
    color: var(--sh-color-accent);
}

body.sh-page .breadcrumb-item.active {
    color: var(--sh-color-text-secondary);
}

/* Navbar toggler */
.sh-navbar .navbar-toggler {
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-md);
    padding: 0.4rem 0.55rem;
}

.sh-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.sh-navbar .navbar-toggler-icon {
    width: 1.15rem;
    height: 1.15rem;
}

/* Nav auth actions */
.sh-nav-auth {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--sh-color-border);
}

@media (min-width: 992px) {
    .sh-nav-auth {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

.sh-nav-auth .btn {
    min-width: 5.5rem;
}

/* Outline buttons — softer, product-like */
body.sh-page .btn-outline-secondary {
    border-color: var(--sh-color-border-strong);
    color: var(--sh-color-text-secondary);
    background: var(--sh-color-bg);
}

body.sh-page .btn-outline-secondary:hover {
    border-color: var(--sh-color-text-secondary);
    background: var(--sh-color-bg-subtle);
    color: var(--sh-color-text);
}

body.sh-page .btn-outline-primary {
    border-color: rgba(30, 64, 175, 0.35);
    color: var(--sh-color-accent);
    background: var(--sh-color-bg);
}

body.sh-page .btn-outline-primary:hover {
    border-color: var(--sh-color-accent);
    background: var(--sh-color-accent-subtle);
    color: var(--sh-color-accent-hover);
}

body.sh-page .btn-dark {
    background: var(--sh-color-text);
    border-color: var(--sh-color-text);
}

body.sh-page .btn-dark:hover {
    background: #1e293b;
    border-color: #1e293b;
}

/* Secondary solid — neutral slate, not Bootstrap gray */
body.sh-page .btn-secondary {
    background: var(--sh-color-text-secondary);
    border-color: var(--sh-color-text-secondary);
}

body.sh-page .btn-secondary:hover {
    background: var(--sh-color-text);
    border-color: var(--sh-color-text);
}

/* Alerts — editorial, not loud Bootstrap */
body.sh-page .alert {
    border-radius: var(--sh-radius-md);
    border-width: 1px;
    font-size: 0.9375rem;
}

body.sh-page .alert-success {
    background: var(--sh-success-bg);
    border-color: #a7f3d0;
    color: #065f46;
}

body.sh-page .alert-warning {
    background: var(--sh-warning-bg);
    border-color: #fcd34d;
    color: #92400e;
}

body.sh-page .alert-danger {
    background: var(--sh-danger-bg);
    border-color: #fecaca;
    color: #991b1b;
}

body.sh-page .alert-info {
    background: var(--sh-color-accent-subtle);
    border-color: rgba(30, 64, 175, 0.2);
    color: #1e3a8a;
}

body.sh-page .alert-light {
    background: var(--sh-color-bg-subtle);
    border-color: var(--sh-color-border);
    color: var(--sh-color-text-secondary);
}

/* Badges — restrained */
body.sh-page .badge.text-bg-light {
    background: var(--sh-color-bg-subtle) !important;
    color: var(--sh-color-text-secondary) !important;
    border: 1px solid var(--sh-color-border);
    font-weight: 500;
}

body.sh-page .badge.text-bg-secondary {
    background: var(--sh-color-bg-muted) !important;
    color: var(--sh-color-text-secondary) !important;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

body.sh-page .badge.text-bg-danger {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca;
    font-weight: 600;
    font-size: 0.7rem;
}

/* Pagination */
.sh-pagination .pagination {
    gap: 0.35rem;
    flex-wrap: wrap;
}

.sh-pagination .page-item .page-link {
    border-radius: var(--sh-radius-md);
    border: 1px solid var(--sh-color-border);
    color: var(--sh-color-text-secondary);
    font-weight: 500;
    font-size: 0.8125rem;
    padding: 0.4rem 0.75rem;
    background: var(--sh-color-bg);
    margin-left: 0;
}

.sh-pagination .page-item .page-link:hover {
    border-color: var(--sh-color-border-strong);
    background: var(--sh-color-bg-subtle);
    color: var(--sh-color-text);
}

.sh-pagination .page-item.active .page-link {
    background: var(--sh-color-text);
    border-color: var(--sh-color-text);
    color: #fff;
}

.sh-pagination .page-item.disabled .page-link {
    opacity: 0.4;
    background: transparent;
    border-color: var(--sh-color-border);
    color: var(--sh-color-muted);
}

.sh-pagination .text-secondary {
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
}

/* API contract table */
.sh-api-contract {
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-lg);
    background: var(--sh-color-bg);
    box-shadow: var(--sh-shadow-xs);
    overflow: hidden;
}

.sh-api-contract__title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--sh-color-border);
    background: var(--sh-color-bg-subtle);
    margin: 0;
}

.sh-api-contract__body {
    padding: 1.25rem;
}

.sh-api-contract__sub {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
    margin-top: 1.5rem;
    margin-bottom: 0.65rem;
}

.sh-api-contract__mime {
    font-family: var(--sh-font-mono);
    font-size: 0.75rem;
    padding: 0.2rem 0.45rem;
    background: var(--sh-color-bg-muted);
    border-radius: var(--sh-radius-sm);
    border: 1px solid var(--sh-color-border);
    color: var(--sh-color-text-secondary);
}

.sh-api-contract__list {
    line-height: 1.55;
}

.sh-table-contract {
    --bs-table-border-color: var(--sh-color-border);
    margin-bottom: 0;
    font-size: 0.8125rem;
}

.sh-table-contract thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
    background: var(--sh-color-bg-subtle) !important;
    border-bottom-color: var(--sh-color-border) !important;
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
}

.sh-table-contract tbody td {
    padding: 0.65rem 0.75rem;
    vertical-align: top;
    border-color: var(--sh-color-border);
}

.sh-table-contract code {
    font-size: 0.78rem;
    color: var(--sh-color-text);
    background: var(--sh-color-bg-muted);
    padding: 0.1rem 0.35rem;
    border-radius: var(--sh-radius-sm);
}

/* Catalog quick filters: selected state less “Bootstrap default” */
.sh-catalog-search .btn-secondary {
    background: var(--sh-color-text) !important;
    border-color: var(--sh-color-text) !important;
    color: #fff !important;
}

.sh-catalog-search .btn-outline-secondary:not(:hover) {
    border-color: var(--sh-color-border);
    color: var(--sh-color-text-secondary);
}

/* Cookie banner */
.sh-cookie-banner {
    border-top: 1px solid var(--sh-color-border) !important;
    background: var(--sh-color-bg) !important;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08) !important;
    backdrop-filter: blur(10px);
}

.sh-cookie-banner #cookie-banner-title {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sh-color-text);
}

/* Footer shell */
.sh-site-footer {
    border-color: var(--sh-color-border) !important;
    margin-top: var(--sh-space-section, 4.5rem) !important;
}

.sh-site-footer .container,
.sh-site-footer .container-xl {
    max-width: 1200px;
}

/* Tool TOC active hint on scroll — optional future; keep hover polish */
.sh-tool-toc a:focus-visible {
    outline: 2px solid rgba(30, 64, 175, 0.35);
    outline-offset: 2px;
}

/* Textareas in tool views — match pre blocks */
body.sh-page textarea.form-control {
    background: var(--sh-color-bg);
}

body.sh-page textarea.form-control:focus {
    background: var(--sh-color-bg);
}

/* Small caps label above code samples (tool API example, etc.) */
.sh-pre-heading {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
    margin-bottom: 0.5rem;
}

/* Modals — less stock Bootstrap on public site */
body.sh-page .modal-content {
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-lg);
    box-shadow: var(--sh-shadow-lg);
}

body.sh-page .modal-header {
    border-bottom-color: var(--sh-color-border);
    padding: 1rem 1.25rem;
}

body.sh-page .modal-footer {
    border-top-color: var(--sh-color-border);
    padding: 1rem 1.25rem;
}

/* =============================================================================
   Billing, pricing, admin subscriptions — premium clarity & trust
   ============================================================================= */

.sh-billing-shell {
    max-width: 42rem;
}

.sh-billing-lead {
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--sh-color-text-secondary);
}

.sh-billing-trust {
    background: linear-gradient(135deg, var(--sh-color-accent-subtle) 0%, var(--sh-color-bg) 55%);
    border-color: rgba(30, 64, 175, 0.14) !important;
    line-height: 1.5;
    border-radius: var(--sh-radius-lg) !important;
}

.sh-billing-trust-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--sh-radius-md);
    background: var(--sh-color-accent-subtle);
    color: var(--sh-color-accent);
}

.sh-billing-card {
    border-radius: var(--sh-radius-xl) !important;
    border: 1px solid var(--sh-color-border) !important;
    box-shadow: var(--sh-shadow-sm) !important;
    background: var(--sh-color-bg);
}

.sh-billing-kicker {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
}

.sh-billing-dl dt {
    font-weight: 500;
    color: var(--sh-color-muted);
    margin-bottom: 0.15rem;
}

.sh-billing-dl dd {
    color: var(--sh-color-text);
    margin-bottom: 0.65rem;
}

.sh-billing-page .alert.border-0,
.sh-pricing-page .alert.border-0 {
    border-radius: var(--sh-radius-lg) !important;
}

.sh-billing-dl code {
    font-size: 0.8125rem;
    background: var(--sh-color-bg-muted);
    padding: 0.15rem 0.4rem;
    border-radius: var(--sh-radius-sm);
}

.sh-billing-cancel-card {
    border: 1px solid rgba(185, 28, 28, 0.22) !important;
    background: linear-gradient(180deg, var(--sh-color-bg) 0%, var(--sh-danger-bg) 120%);
    border-radius: var(--sh-radius-xl) !important;
    box-shadow: var(--sh-shadow-sm) !important;
}

.sh-billing-cancel-card .sh-billing-kicker {
    color: var(--sh-danger);
}

.sh-billing-page-head {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--sh-color-border);
}

.sh-billing-page-head .sh-page-title {
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.sh-billing-card--lead {
    border-left: 3px solid var(--sh-color-accent);
}

.sh-billing-faq .accordion-item {
    background: transparent;
}

.sh-billing-faq .accordion-button {
    font-size: 0.875rem;
    box-shadow: none !important;
    background: var(--sh-color-bg-subtle);
    color: var(--sh-color-text);
}

.sh-billing-faq .accordion-button:not(.collapsed) {
    background: var(--sh-color-accent-subtle);
    color: var(--sh-color-accent);
}

.sh-billing-faq .accordion-body {
    background: var(--sh-color-bg);
}

/* —— Pricing page: white canvas like tools/content; hierarchy from cards only (RTL-aware) —— */
/* Descendant combinator (not `>`): works if any wrapper sits between body and main (extensions, banners). */

body.sh-page main.py-5.sh-pricing-page {
    padding-top: 3.5rem !important;
    padding-bottom: 5rem !important;
    /* Solid white surface; !important beats utilities tinting <main> */
    background: var(--sh-color-bg) !important;
    background-color: var(--sh-color-bg) !important;
    background-image: none !important;
}

body.sh-page main.py-5.sh-pricing-page::before,
body.sh-page main.py-5.sh-pricing-page::after {
    content: none;
    display: none;
}

/* Descendants: no stray tinted bands (shell uses explicit white below) */
.sh-pricing-page .sh-pricing-tier-row,
.sh-pricing-page .sh-billing-page-head.sh-pricing-hero,
.sh-pricing-page .sh-pricing-includes,
.sh-pricing-page .sh-pricing-section-spacer,
.sh-pricing-page .sh-pricing-tier-grid,
.sh-pricing-page .sh-pricing-faq,
.sh-pricing-page .sh-pricing-compare,
.sh-pricing-page .sh-pricing-section {
    background: transparent;
    background-image: none;
}

.sh-pricing-page .sh-billing-page-head.sh-pricing-hero::before,
.sh-pricing-page .sh-billing-page-head.sh-pricing-hero::after {
    content: none;
    display: none;
}

@media (min-width: 992px) {
    body.sh-page main.py-5.sh-pricing-page {
        padding-top: 5rem !important;
        padding-bottom: 6rem !important;
    }
}

.sh-pricing-page .sh-pricing-shell {
    max-width: 1160px;
    background: var(--sh-color-bg);
    background-color: var(--sh-color-bg);
    background-image: none;
}

.sh-pricing-page .sh-billing-page-head.sh-pricing-hero {
    border-bottom: none;
    margin-bottom: 3rem;
    padding-bottom: 0;
    padding-top: 0.25rem;
    text-align: center;
}

@media (min-width: 992px) {
    .sh-pricing-page .sh-billing-page-head.sh-pricing-hero {
        text-align: start;
        margin-bottom: 3.5rem;
    }
}

.sh-pricing-hero__eyebrow {
    letter-spacing: 0.12em;
    color: var(--sh-color-accent);
}

.sh-pricing-hero__title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--sh-color-text);
    margin-bottom: 1rem !important;
    margin-inline: auto;
    max-width: 22rem;
}

@media (min-width: 992px) {
    .sh-pricing-hero__title {
        margin-bottom: 1.25rem !important;
        margin-inline: 0;
        max-width: 36rem;
    }
}

.sh-pricing-hero__lead {
    font-size: 1.0625rem;
    line-height: 1.65;
    max-width: 36rem;
    margin-inline: auto;
    color: var(--sh-color-text-secondary);
    font-weight: 400;
}

@media (min-width: 992px) {
    .sh-pricing-hero__lead {
        margin-inline: 0;
        max-width: 40rem;
    }
}

.sh-pricing-muted-block {
    line-height: 1.62;
    color: var(--sh-color-text-secondary);
}

.sh-pricing-anon-meta {
    color: var(--sh-color-text-secondary);
}

/* Strip .sh-billing-trust gradient on Pricing: same flat card base as tool/content pages */
.sh-pricing-guest-hint.sh-billing-trust {
    background: var(--sh-color-bg);
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-color-border) !important;
    box-shadow: var(--sh-shadow-sm);
}

.sh-pricing-guest-hint__text {
    line-height: 1.62;
    color: var(--sh-color-text-secondary);
}

.sh-pricing-anon-card {
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-color-border) !important;
    background-color: var(--sh-color-bg) !important;
    box-shadow: var(--sh-shadow-sm) !important;
}

.sh-pricing-tier-row {
    margin-top: 0.25rem;
    --bs-gutter-y: 1.75rem;
}

@media (min-width: 992px) {
    .sh-pricing-tier-row {
        --bs-gutter-y: 2rem;
    }
}

/* Tier cards: same language as .sh-card / .sh-tool-card */
.sh-pricing-tier-card.sh-billing-card {
    position: relative;
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-color-border) !important;
    background-color: var(--sh-color-bg) !important;
    box-shadow: var(--sh-shadow-sm) !important;
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.sh-pricing-tier-card.sh-billing-card:hover {
    box-shadow: var(--sh-shadow-md) !important;
    border-color: var(--sh-color-border-strong) !important;
    transform: translateY(-2px);
}

.sh-pricing-tier-card--internal.sh-billing-card {
    background-color: var(--sh-color-bg-subtle) !important;
    border: 1px dashed var(--sh-color-border-strong) !important;
    box-shadow: var(--sh-shadow-sm) !important;
}

.sh-pricing-tier-card--internal.sh-billing-card:hover {
    box-shadow: var(--sh-shadow-md) !important;
    border-color: var(--sh-color-border-strong) !important;
    border-style: dashed !important;
    transform: translateY(-1px);
}

.sh-pricing-tier-card--featured.sh-billing-card {
    border: 1px solid var(--sh-color-accent) !important;
    background-color: var(--sh-color-bg) !important;
    box-shadow: var(--sh-shadow-md) !important;
}

.sh-pricing-tier-card--featured.sh-billing-card::before {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    border-radius: var(--sh-radius-lg) var(--sh-radius-lg) 0 0;
    background-color: var(--sh-color-accent);
    pointer-events: none;
    z-index: 0;
}

.sh-pricing-tier-card--featured.sh-billing-card .sh-pricing-tier-body {
    position: relative;
    z-index: 1;
}

.sh-pricing-tier-card--featured.sh-billing-card:hover {
    border-color: var(--sh-color-accent-hover) !important;
    box-shadow: var(--sh-shadow-lg) !important;
    transform: translateY(-2px);
}

.sh-pricing-tier-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.65rem;
    color: var(--sh-color-accent);
    background-color: var(--sh-color-accent-subtle);
    border: 1px solid var(--sh-color-border);
}

@media (min-width: 768px) {
    .sh-pricing-col--featured {
        z-index: 1;
    }
}

.sh-pricing-tier-body {
    min-height: 100%;
}

.sh-pricing-card-desc__lead {
    font-size: 0.9375rem;
    line-height: 1.55;
    font-weight: 500;
}

.sh-pricing-card-desc__sub {
    line-height: 1.55;
}

.sh-pricing-price-block {
    padding-bottom: 0;
    border-bottom: none;
}

.sh-pricing-price-row__currency {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}

.sh-pricing-price-row__amount {
    font-size: clamp(2.5rem, 6vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.95;
    color: var(--sh-color-text);
    font-variant-numeric: tabular-nums;
}

.sh-pricing-tier-card--featured .sh-pricing-price-row__amount {
    color: var(--sh-color-text);
}

.sh-pricing-price-row--text .sh-pricing-price-row__text {
    font-size: clamp(1.75rem, 4vw, 2.125rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--sh-color-text);
}

.sh-pricing-price-note {
    line-height: 1.5;
    max-width: 22rem;
}

.sh-pricing-feature-list__item + .sh-pricing-feature-list__item {
    margin-top: 0.75rem;
}

.sh-pricing-feature-list__icon {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--sh-success);
    margin-top: 0.1rem;
}

.sh-pricing-feature-list__text {
    line-height: 1.55;
    color: var(--sh-color-text-secondary);
}

.sh-pricing-limits {
    background-color: var(--sh-color-bg-subtle);
    border-radius: var(--sh-radius-lg);
    padding: 1rem 1.125rem;
    border: 1px solid var(--sh-color-border);
    box-shadow: var(--sh-shadow-xs);
}

.sh-pricing-tier-card--internal .sh-pricing-limits {
    background-color: var(--sh-color-bg);
}

.sh-pricing-limits__label {
    letter-spacing: 0.06em;
    font-size: 0.6875rem !important;
}

.sh-pricing-limits__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding-block: 0.5rem;
    border-bottom: 1px solid var(--sh-color-border);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.sh-pricing-limits__row--last {
    border-bottom: none;
    padding-bottom: 0;
}

.sh-pricing-limits__k {
    color: var(--sh-color-text-secondary);
    font-weight: 500;
}

.sh-pricing-limits__v {
    color: var(--sh-color-text);
    font-weight: 600;
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.sh-pricing-limits__code {
    font-size: 0.6875rem;
    padding: 0.1rem 0.35rem;
    background-color: var(--sh-color-bg);
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-sm);
    color: var(--sh-color-text-secondary);
}

.sh-pricing-tier-card--featured .sh-pricing-limits {
    background-color: var(--sh-color-bg-subtle);
    border-color: var(--sh-color-border);
}

.sh-pricing-cta-area {
    border-top: 1px solid var(--sh-color-border);
    margin-top: 0;
}

.sh-pricing-cta-stack {
    gap: 0.5rem !important;
}

/* Full-width CTAs: match global .btn-primary; extra depth only inside featured card */
.sh-pricing-page .sh-pricing-btn-primary.btn-lg {
    min-height: 3.25rem;
    font-size: 1rem;
    padding-block: 0.9rem;
}

.sh-pricing-page .sh-pricing-tier-card--featured .sh-pricing-btn-primary.btn {
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.2);
}

.sh-pricing-page .sh-pricing-tier-card--featured .sh-pricing-btn-primary.btn:hover {
    box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25);
}

.sh-pricing-page .sh-pricing-btn-secondary.btn-lg {
    min-height: 3.25rem;
    font-size: 1rem;
}

.sh-pricing-page .sh-pricing-btn-internal.btn-outline-secondary {
    font-weight: 600;
    border-style: dashed;
    color: var(--sh-color-text-secondary);
}

.sh-pricing-page .sh-pricing-btn-secondary.btn-sm {
    min-height: auto;
    padding-block: 0.4rem;
    font-size: 0.8125rem;
}

.sh-pricing-cta-icon {
    margin-inline-end: 0.5rem;
}

.sh-pricing-cta-hint {
    line-height: 1.55;
    padding-inline: 0.25rem;
    padding-block-start: 0.25rem;
}

.sh-pricing-cta-hint--pro {
    padding-block-start: 0.35rem;
}

.sh-pricing-callout {
    line-height: 1.5 !important;
    border-radius: var(--sh-radius-md) !important;
}

.sh-pricing-includes-card.sh-billing-card {
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-color-border) !important;
    border-inline-start-width: 3px;
    border-inline-start-style: solid;
    border-inline-start-color: var(--sh-color-accent) !important;
    background-color: var(--sh-color-bg-subtle) !important;
    box-shadow: var(--sh-shadow-sm) !important;
}

.sh-pricing-includes-card.sh-billing-card::before {
    display: none;
}

.sh-pricing-includes-card.sh-billing-card .card-body {
    position: relative;
}

@media (min-width: 992px) {
    .sh-pricing-includes__body {
        padding: 2.5rem !important;
    }
}

.sh-pricing-includes__title {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--sh-color-text);
}

.sh-pricing-includes__lead {
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 34rem;
    color: var(--sh-color-text-secondary);
}

.sh-pricing-includes__list {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--sh-color-text);
    font-weight: 500;
}

.sh-pricing-includes__check {
    color: var(--sh-success);
    font-size: 1.125rem;
    line-height: 1.2;
    margin-top: 0.08rem;
}

.sh-pricing-section-spacer {
    margin-top: 4rem;
}

@media (min-width: 992px) {
    .sh-pricing-section-spacer {
        margin-top: 5rem;
    }
}

.sh-pricing-trust-footer.sh-billing-trust {
    background: var(--sh-color-bg-subtle);
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-color-border) !important;
    box-shadow: var(--sh-shadow-sm);
    padding: 1.25rem 1.25rem !important;
}

@media (min-width: 768px) {
    .sh-pricing-trust-footer.sh-billing-trust {
        padding: 1.5rem 1.5rem !important;
    }
}

.sh-pricing-trust-footer__title {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.012em;
    color: var(--sh-color-text);
}

.sh-pricing-trust-footer__text {
    line-height: 1.65;
    max-width: 40rem;
    color: var(--sh-color-text-secondary);
    font-size: 0.9375rem;
}

[dir='rtl'] .sh-pricing-page .sh-pricing-feature-list__item {
    flex-direction: row-reverse;
    text-align: start;
}

[dir='rtl'] .sh-pricing-page .sh-pricing-limits__v {
    text-align: start;
}

[dir='rtl'] .sh-pricing-page .sh-pricing-includes__item {
    flex-direction: row-reverse;
    text-align: start;
}

@media (max-width: 767.98px) {
    .sh-pricing-hero__title {
        font-size: 1.85rem;
    }

    .sh-pricing-tier-row {
        --bs-gutter-y: 1.5rem;
    }

    .sh-pricing-page .sh-pricing-btn-primary.btn,
    .sh-pricing-page .sh-pricing-btn-secondary.btn-outline-primary,
    .sh-pricing-page .sh-pricing-btn-secondary.btn-outline-secondary,
    .sh-pricing-page .sh-pricing-btn-internal.btn-outline-secondary {
        min-height: 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sh-pricing-tier-card.sh-billing-card {
        transition: none !important;
    }

    .sh-pricing-tier-card.sh-billing-card:hover,
    .sh-pricing-tier-card--internal.sh-billing-card:hover,
    .sh-pricing-tier-card--featured.sh-billing-card:hover {
        transform: none !important;
    }
}

/* —— Admin PayPal / subscriptions —— */
.sh-admin-billing-intro {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--sh-color-text-secondary);
    max-width: 52rem;
}

.sh-admin-billing-card {
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-color-border) !important;
    box-shadow: var(--sh-shadow-sm) !important;
    overflow: hidden;
}

.sh-admin-billing-card > .card-header {
    background: linear-gradient(180deg, var(--sh-color-bg-subtle) 0%, var(--sh-color-bg) 100%) !important;
    border-bottom: 1px solid var(--sh-color-border) !important;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
}

.sh-admin-billing-card .table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
    white-space: nowrap;
    border-bottom-width: 1px;
}

.sh-admin-billing-card .table tbody td {
    vertical-align: middle;
}

.sh-admin-billing-actions .btn {
    min-height: 2rem;
}

.sh-admin-billing-legend {
    font-size: 0.75rem;
    color: var(--sh-color-muted);
    padding: 0.5rem 0.75rem;
    background: var(--sh-color-bg-subtle);
    border-bottom: 1px solid var(--sh-color-border);
}
