/* ============================================================
   PAGE-SPECIFIC: codex-models-token-usage-guide UX polish
   ============================================================ */
body.single-tool.postid-20 .sc-main-text table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.single-tool.postid-20 .sc-quick-answer-card {
    border: 1px solid var(--hp-border);
    background: var(--hp-card);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin: 1rem 0 1.25rem;
}

body.single-tool.postid-20 .sc-jump-nav {
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin: 0 0 1.2rem;
    background: rgba(255, 255, 255, 0.03);
}

body.single-tool.postid-20 .sc-jump-nav a {
    text-decoration: none;
}

body.single-tool.postid-20 .sc-jump-nav a:hover,
body.single-tool.postid-20 .sc-jump-nav a:focus {
    text-decoration: underline;
}

body.single-tool.postid-20 .sc-model-details > summary {
    cursor: pointer;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--hp-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

body.single-tool.postid-20 .sc-model-details > summary:hover,
body.single-tool.postid-20 .sc-model-details > summary:focus {
    background: rgba(255, 255, 255, 0.06);
}

body.single-tool.postid-20 .sc-sidebar-sticky {
    top: 1.25rem;
}

body.single-tool.postid-20 .sc-sidebar-onpage .sc-sidebar-facts li {
    border-bottom: 0;
    padding: 0.25rem 0;
}

@media (max-width: 1024px) {
    body.single-tool.postid-20 .sc-sidebar-onpage {
        display: none;
    }
}

@media (max-width: 768px) {
    body.single-tool.postid-20 .sc-sidebar-sticky {
        position: static;
    }
}

body.single-tool.postid-20 .sc-main-text pre {
    background: #0f172a;
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    overflow-x: auto;
}

body.single-tool.postid-20 .sc-main-text pre code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.86rem;
    line-height: 1.45;
    white-space: pre;
}

body.single-tool.postid-20 .sc-main-text ul,
body.single-tool.postid-20 .sc-main-text ol {
    padding-left: 1.2rem;
}

/* Reduce aggressive green-arrow style on this guide only. */
body.single-tool.postid-20 .sc-main-text .sc-list,
body.single-tool.postid-20 .sc-main-text .sc-sidebar-facts {
    list-style: disc;
    padding-left: 1.2rem;
}

body.single-tool.postid-20 .sc-main-text .sc-list li::before,
body.single-tool.postid-20 .sc-main-text .sc-list-pros li::before,
body.single-tool.postid-20 .sc-main-text .sc-list-cons li::before {
    content: none;
}

body.single-tool.postid-20 .sc-main-text .sc-decision-box {
    border: 1px solid var(--hp-border);
    background: rgba(16, 185, 129, 0.08);
    border-radius: 10px;
    padding: 0.9rem 1rem;
}

/* Mobile-first layout hardening + readability modules */
body.single-tool.postid-20 .sc-layout-grid > * {
    min-width: 0;
}

body.single-tool.postid-20 .sc-content-main,
body.single-tool.postid-20 .sc-editorial-section,
body.single-tool.postid-20 .sc-main-text {
    min-width: 0;
    max-width: 100%;
}

body.single-tool.postid-20 .sc-hero-title {
    overflow-wrap: anywhere;
    word-break: normal;
}

body.single-tool.postid-20 .sc-hero-cta-wrap .sc-btn-primary {
    max-width: 100%;
    white-space: normal;
    text-wrap: balance;
}

body.single-tool.postid-20 .sc-guide-meta {
    color: var(--hp-text-muted);
    font-size: 0.86rem;
    margin: 0 0 0.85rem;
}

body.single-tool.postid-20 .sc-risk-grid {
    display: grid;
    gap: 0.6rem;
}

body.single-tool.postid-20 .sc-risk-row {
    border: 1px solid var(--hp-border);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
}

body.single-tool.postid-20 .sc-risk-row span {
    display: block;
    font-weight: 700;
    margin-top: 0.15rem;
}

body.single-tool.postid-20 .sc-risk-row em {
    display: block;
    margin-top: 0.15rem;
    color: var(--hp-text-muted);
    font-style: normal;
    font-size: 0.9rem;
}

body.single-tool.postid-20 .sc-jump-mobile {
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    margin: 0 0 1rem;
    background: rgba(255, 255, 255, 0.03);
}

body.single-tool.postid-20 .sc-jump-mobile > summary {
    cursor: pointer;
    padding: 0.7rem 0.85rem;
    font-weight: 700;
}

body.single-tool.postid-20 .sc-jump-mobile .sc-jump-nav {
    border: 0;
    margin: 0;
    padding: 0 0.85rem 0.85rem;
    background: transparent;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.75rem;
}

body.single-tool.postid-20 .sc-jump-mobile .sc-jump-nav a {
    display: block;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--hp-border);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.02);
    line-height: 1.2;
}

body.single-tool.postid-20 .sc-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--hp-border);
    border-radius: 9px;
    margin: 1rem 0 1.15rem;
}

body.single-tool.postid-20 .sc-table-scroll > table {
    display: table;
    width: 100%;
    min-width: 680px;
    margin: 0;
    border: 0;
    border-radius: 0;
}

body.single-tool.postid-20 .sc-model-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0.6rem 0 1rem;
}

body.single-tool.postid-20 .sc-model-card {
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
    background: rgba(255, 255, 255, 0.02);
}

body.single-tool.postid-20 .sc-model-card h3 {
    margin-bottom: 0.55rem;
}

body.single-tool.postid-20 .sc-model-legacy {
    margin: 0.8rem 0 1.2rem;
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    overflow: hidden;
}

body.single-tool.postid-20 .sc-model-legacy > summary {
    cursor: pointer;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    font-weight: 700;
}

body.single-tool.postid-20 .sc-model-legacy > div {
    padding: 0.75rem 0.85rem;
}

body.single-tool.postid-20 .sc-context-warning {
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.08);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    margin: 0.6rem 0 1.25rem;
}

body.single-tool.postid-20 .sc-plain-list {
    list-style: disc;
    padding-left: 1.2rem;
}

body.single-tool.postid-20 .sc-plain-list li {
    padding-left: 0;
    margin-bottom: 0.55rem;
}

body.single-tool.postid-20 .sc-step-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0.5rem 0 1rem;
}

body.single-tool.postid-20 .sc-step-card {
    border: 1px solid var(--hp-border);
    border-radius: 9px;
    padding: 0.7rem 0.8rem;
    background: rgba(255, 255, 255, 0.02);
}

body.single-tool.postid-20 .sc-step-card h3 {
    margin-bottom: 0.35rem;
}

body.single-tool.postid-20 .sc-prompt-details {
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    margin: 0 0 0.85rem;
    overflow: hidden;
}

body.single-tool.postid-20 .sc-prompt-details > summary {
    cursor: pointer;
    font-weight: 700;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
}

body.single-tool.postid-20 .sc-prompt-details > pre {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--hp-border);
    border-radius: 0;
}

body.single-tool.postid-20 .sc-main-text pre {
    max-width: 100%;
}

body.single-tool.postid-20 .sc-main-text pre code {
    display: block;
    min-width: 540px;
}

@media (max-width: 900px) {
    body.single-tool.postid-20 .sc-sidebar-sticky {
        display: none;
    }
}

@media (max-width: 768px) {
    body.single-tool.postid-20 .sc-container {
        padding: 0 0.85rem;
    }

    body.single-tool.postid-20 .sc-content-main {
        padding: 1rem 0.9rem;
    }

    body.single-tool.postid-20 .sc-hero-title {
        font-size: clamp(1.55rem, 8.6vw, 2rem);
        line-height: 1.12;
        max-width: 100%;
    }

    body.single-tool.postid-20 .sc-hero-cta-wrap {
        max-width: 100%;
    }

    body.single-tool.postid-20 .sc-jump-mobile .sc-jump-nav {
        grid-template-columns: 1fr;
    }

    body.single-tool.postid-20 .sc-model-card-grid,
    body.single-tool.postid-20 .sc-step-grid {
        grid-template-columns: 1fr;
    }

    body.single-tool.postid-20 .sc-table-scroll > table {
        min-width: 620px;
    }

    body.single-tool.postid-20 .sc-main-text pre code {
        min-width: 520px;
    }
}

/* ============================================================
   PAGE-SPECIFIC: simplification + card-first readability pass
   ============================================================ */
body.single-tool.postid-20 .sc-main-text > * {
    max-width: 100%;
}

body.single-tool.postid-20 .sc-main-text p {
    margin-bottom: 0.9rem;
}

body.single-tool.postid-20 .sc-capybara-note {
    margin-top: 0.85rem;
    color: var(--hp-text-muted);
    font-size: 0.9rem;
}

body.single-tool.postid-20 .sc-routing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.single-tool.postid-20 .sc-task-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0.5rem 0 1rem;
}

body.single-tool.postid-20 .sc-task-card,
body.single-tool.postid-20 .sc-cost-card {
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    padding: 0.78rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
}

body.single-tool.postid-20 .sc-task-card h4 {
    margin-bottom: 0.45rem;
    font-size: 1rem;
}

body.single-tool.postid-20 .sc-mobile-note {
    display: none;
    font-size: 0.82rem;
    color: var(--hp-text-muted);
    margin: 0 0 0.55rem;
}

body.single-tool.postid-20 .sc-table-scroll > .sc-pricing-master-table {
    min-width: 700px;
}

body.single-tool.postid-20 .sc-cost-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0.5rem 0 1rem;
}

body.single-tool.postid-20 .sc-cost-card h3 {
    margin-bottom: 0.45rem;
}

body.single-tool.postid-20 .sc-main-text ol.sc-plain-list {
    list-style: decimal;
}

body.single-tool.postid-20 .sc-main-text ul.sc-plain-list li::before,
body.single-tool.postid-20 .sc-main-text ol.sc-plain-list li::before {
    content: none;
}

@media (max-width: 1024px) {
    body.single-tool.postid-20 .sc-routing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.single-tool.postid-20 .sc-cost-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body.single-tool.postid-20 .sc-mobile-note {
        display: block;
    }

    body.single-tool.postid-20 .sc-routing-grid,
    body.single-tool.postid-20 .sc-task-grid,
    body.single-tool.postid-20 .sc-model-card-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PAGE-SPECIFIC: final UX cleanup (pricing + copy-paste setup)
   ============================================================ */
body.single-tool.postid-20 .sc-pricing-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0.65rem 0 1.1rem;
}

body.single-tool.postid-20 .sc-pricing-card {
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
    background: rgba(255, 255, 255, 0.02);
}

body.single-tool.postid-20 .sc-pricing-card h3 {
    margin-bottom: 0.45rem;
}

body.single-tool.postid-20 .sc-pricing-card--legacy {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.38);
}

body.single-tool.postid-20 .sc-risk-rating-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0.5rem 0 1rem;
}

body.single-tool.postid-20 .sc-risk-rating-card {
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
    background: rgba(255, 255, 255, 0.02);
}

body.single-tool.postid-20 .sc-risk-rating-card h4 {
    margin-bottom: 0.45rem;
}

body.single-tool.postid-20 .sc-checklist-card {
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.8rem 0.95rem;
    margin: 0.45rem 0 1rem;
}

/* Raw templates: readable first, raw markdown hidden in details. */
body.single-tool.postid-20 .sc-main-text .sc-prompt-details pre {
    max-width: 100%;
    overflow-x: auto;
}

body.single-tool.postid-20 .sc-main-text .sc-prompt-details pre code {
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 1100px) {
    body.single-tool.postid-20 .sc-pricing-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body.single-tool.postid-20 .sc-pricing-card-grid,
    body.single-tool.postid-20 .sc-risk-rating-grid {
        grid-template-columns: 1fr;
    }
}

/* Risk rating cards: badge + title consistency and calm spacing */
body.single-tool.postid-20 .sc-risk-rating-card {
    background: rgba(255, 255, 255, 0.025);
    border-color: var(--hp-border);
}

body.single-tool.postid-20 .sc-risk-rating-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
}

body.single-tool.postid-20 .sc-risk-rating-head {
    margin: 0;
    font-size: 1.03rem;
    line-height: 1.2;
}

body.single-tool.postid-20 .sc-risk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.14);
    color: #e2f4ff;
    font-weight: 700;
    font-size: 0.82rem;
    flex: 0 0 auto;
}

/* Mobile-only inline navigation + CTA for long guide pages */
body.single-tool.postid-20 .sc-mobile-onpage-nav {
    display: none;
}

@media (max-width: 900px) {
    body.single-tool.postid-20 .sc-mobile-onpage-nav {
        display: block;
        margin: 0.2rem 0 0.9rem;
    }

    body.single-tool.postid-20 .sc-mobile-onpage-nav details {
        border: 1px solid var(--hp-border);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.03);
        padding: 0.2rem 0.75rem 0.75rem;
    }

    body.single-tool.postid-20 .sc-mobile-onpage-nav summary {
        cursor: pointer;
        font-weight: 700;
        padding: 0.55rem 0;
        list-style: none;
    }

    body.single-tool.postid-20 .sc-mobile-onpage-nav summary::-webkit-details-marker {
        display: none;
    }

    body.single-tool.postid-20 .sc-mobile-onpage-links {
        list-style: none;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        margin: 0.4rem 0 0.75rem;
        padding: 0;
    }

    body.single-tool.postid-20 .sc-mobile-onpage-links li {
        margin: 0;
        padding: 0;
    }

    body.single-tool.postid-20 .sc-mobile-onpage-links a {
        display: block;
        padding: 0.45rem 0.55rem;
        border: 1px solid var(--hp-border);
        border-radius: 8px;
        font-size: 0.88rem;
        line-height: 1.2;
        text-decoration: none;
        color: var(--hp-text);
        background: rgba(255, 255, 255, 0.02);
    }

    body.single-tool.postid-20 .sc-mobile-onpage-cta {
        width: 100%;
        text-align: center;
        margin-top: 0.15rem;
    }
}

@media (max-width: 480px) {
    body.single-tool.postid-20 .sc-mobile-onpage-links {
        grid-template-columns: 1fr;
    }
}
