/* ProwessApps V4 - Programs section */
.pa-programs-page {
    background: #f7f9fc;
    color: #172033;
}

.pa-programs-shell {
    width: 100%;
    max-width: 1600px;
    margin-inline: auto;
}

.pa-programs-hero {
    background:
        radial-gradient(circle at 90% 15%, rgba(255, 255, 255, 0.2), transparent 24%),
        linear-gradient(135deg, #0d47a1 0%, #1769e0 52%, #0b8f82 100%);
    color: #fff;
}

.pa-programs-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 2rem;
    align-items: center;
}

.pa-hero-breadcrumb {
    margin-bottom: 1.5rem;
}

.pa-hero-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
}

.pa-hero-breadcrumb .breadcrumb-item a:hover {
    color: #fff;
}

.pa-hero-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.5);
}

.pa-hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.4);
}

.pa-programs-eyebrow {
    margin: 0 0 0.5rem;
    color: #1769e0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pa-programs-hero .pa-programs-eyebrow {
    color: #d9f3ff;
}

.pa-programs-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.25rem, 4.2vw, 3.8rem);
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.pa-programs-intro {
    max-width: 760px;
    margin: 1.1rem 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.7;
}

.pa-programs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.pa-programs-actions .btn-primary {
    background: #fff;
    border-color: #fff;
    color: #0d55b7;
}

.pa-programs-actions .btn-outline-primary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.pa-programs-actions .btn-outline-primary:hover {
    background: #fff;
    color: #0d55b7;
}

.pa-programs-hero-stats {
    display: grid;
    gap: 0.8rem;
}

.pa-program-stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.15rem;
    min-height: 92px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

.pa-program-stat strong {
    color: #fff;
    font-size: clamp(1.75rem, 3vw, 2.2rem);
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.pa-program-stat span {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 650;
}

.pa-programs-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.pa-programs-benefits article {
    display: flex;
    gap: 0.9rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #dce5f0;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.pa-programs-benefits i {
    display: grid;
    width: 2.6rem;
    height: 2.6rem;
    flex: 0 0 2.6rem;
    place-items: center;
    background: #eaf2ff;
    border-radius: 0.8rem;
    color: #1769e0;
    font-size: 1.25rem;
}

.pa-programs-benefits h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.pa-programs-benefits p {
    margin: 0;
    color: #627086;
    font-size: 0.9rem;
    line-height: 1.5;
}

.pa-programs-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.5rem;
    align-items: start;
}

.pa-programs-main {
    min-width: 0;
}

.pa-programs-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0 1rem;
}

.pa-programs-section-heading h2 {
    margin: 0;
    color: #172033;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 800;
}

.pa-programs-process .pa-programs-section-heading h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.pa-programs-section-heading p:last-child {
    margin: 0.5rem 0 0;
    color: #68758a;
}

.pa-language-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.pa-language-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    padding: 1.15rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce5f0;
    border-top: 4px solid var(--language-accent);
    border-radius: 1.1rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.pa-language-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.pa-language-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pa-language-icon {
    display: grid;
    width: 3.15rem;
    height: 3.15rem;
    place-items: center;
    background: color-mix(in srgb, var(--language-accent) 12%, white);
    border-radius: 1rem;
    color: var(--language-accent);
    font-size: 1.6rem;
}

.pa-language-icon-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.pa-language-count {
    padding: 0.35rem 0.65rem;
    background: #f1f5f9;
    border-radius: 999px;
    color: #526076;
    font-size: 0.78rem;
    font-weight: 750;
}

.pa-language-card h3 {
    margin: 0.8rem 0 0.45rem;
    color: #172033;
    font-size: 1.35rem;
    font-weight: 800;
}

.pa-language-card h3 a {
    color: inherit;
    text-decoration: none;
}

.pa-language-card h3 a:hover {
    color: var(--language-accent);
}

.pa-language-more-topics {
    margin: -0.25rem 0 0.9rem;
    color: #718096;
    font-size: 0.82rem;
    font-weight: 650;
}

.pa-language-card > p {
    margin: 0;
    color: #66758a;
    line-height: 1.65;
}

.pa-topic-preview {
    display: grid;
    gap: 0.4rem;
    margin: 0.8rem 0;
    padding: 0;
    list-style: none;
}

.pa-topic-preview li {
    margin: 0;
    padding: 0;
}

.pa-topic-preview a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    padding: 0.35rem 0.4rem;
    border-radius: 0.55rem;
    color: #3f4c61;
    text-decoration: none;
    font-size: 0.92rem;
}

.pa-topic-preview a:hover {
    background: color-mix(in srgb, var(--language-accent) 7%, white);
    color: var(--language-accent);
}

.pa-topic-preview i {
    color: var(--language-accent);
}

.pa-topic-preview small {
    min-width: 1.8rem;
    padding: 0.15rem 0.4rem;
    background: #f1f5f9;
    border-radius: 999px;
    text-align: center;
}

.pa-language-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e6ebf2;
    color: var(--language-accent);
    font-weight: 750;
    text-decoration: none;
}

.pa-language-link:hover {
    text-decoration: underline;
}

.pa-programs-process ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pa-programs-process li {
    display: flex;
    gap: 0.85rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #dce5f0;
    border-radius: 1rem;
}

.pa-programs-process li > span {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    place-items: center;
    background: #1769e0;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
}

.pa-programs-process h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.pa-programs-process p {
    margin: 0;
    color: #68758a;
    font-size: 0.92rem;
    line-height: 1.55;
}

.pa-programs-side-sticky {
    position: sticky;
    top: 5.5rem;
}

.pa-programs-side-card {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #dce5f0;
    border-radius: 1rem;
}

.pa-programs-side-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.pa-programs-side-card ul {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pa-programs-side-card a {
    color: #31527f;
    text-decoration: none;
}

.pa-programs-side-card a:hover {
    color: #1769e0;
    text-decoration: underline;
}

.pa-programs-ad {
    margin-block: 1.25rem;
}

.pa-programs-ad-top {
    margin-top: 0;
    margin-bottom: 1.25rem;
}


@media (max-width: 1199.98px) {
    .pa-programs-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 1200px) {
    .pa-programs-process ol {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .pa-programs-hero-inner {
        grid-template-columns: 1fr;
    }

    .pa-programs-hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pa-programs-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .pa-programs-benefits,
    .pa-language-grid,
    .pa-programs-process ol {
        grid-template-columns: 1fr;
    }

    .pa-programs-hero-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .pa-programs-shell {
        padding-inline: 0.75rem;
    }

    .pa-programs-hero {
        padding: 1.25rem;
        border-radius: 1.1rem;
    }

    .pa-programs-actions {
        display: grid;
    }

    .pa-programs-actions .btn {
        width: 100%;
    }

    .pa-language-card {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pa-language-card {
        transition: none;
    }
}

.pa-language-link:focus-visible,
.pa-topic-preview a:focus-visible,
.pa-language-card h3 a:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
    border-radius: 0.35rem;
}

.pa-programs-side .pa-ad-wrapper {
    min-height: 280px;
}


/* Language Page */
.pa-language-page-header {
    background: color-mix(in srgb, var(--language-accent) 8%, white);
    border-bottom: 1px solid color-mix(in srgb, var(--language-accent) 15%, #e6ebf2);
}

.pa-language-page-header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.pa-language-page-icon {
    display: grid;
    width: 4rem;
    height: 4rem;
    flex: 0 0 4rem;
    place-items: center;
    background: var(--language-accent);
    border-radius: 1.25rem;
    color: #fff;
    font-size: 2rem;
}

.pa-language-page-header h1 {
    margin: 0 0 0.35rem;
    color: #172033;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 850;
}

.pa-language-page-header p {
    margin: 0;
    color: #526076;
    font-size: 1.1rem;
}

.pa-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

@media (max-width: 991.98px) {
    .pa-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .pa-topic-grid {
        grid-template-columns: 1fr;
    }
}

.pa-topic-card {
    position: relative;
    display: flex;
    background: #fff;
    border: 1px solid #dce5f0;
    border-radius: 1.1rem;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.pa-topic-card a {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1.25rem;
    color: inherit;
    text-decoration: none;
}

.pa-topic-card:hover, .pa-topic-card:focus-within {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--language-accent) 40%, transparent);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.pa-topic-card:focus-within {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

.pa-topic-card-icon {
    display: grid;
    width: 3.1rem;
    height: 3.1rem;
    flex: 0 0 3.1rem;
    place-items: center;
    background: color-mix(in srgb, var(--language-accent) 8%, white);
    border-radius: 0.8rem;
    color: var(--language-accent);
    font-size: 1.4rem;
}

.pa-topic-card-content {
    flex: 1;
    min-width: 0;
}

.pa-topic-card-content h2 {
    margin: 0 0 0.2rem;
    color: #172033;
    font-size: 1.15rem;
    font-weight: 750;
}

.pa-topic-card-desc {
    margin: 0 0 0.4rem;
    color: #4a5568;
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pa-topic-card-count {
    color: #718096;
    font-size: 0.85rem;
    font-weight: 600;
}

.pa-topic-card-arrow {
    color: #a0aec0;
    font-size: 1.2rem;
    transition: transform 150ms ease, color 150ms ease;
}

.pa-topic-card:hover .pa-topic-card-arrow {
    transform: translateX(3px);
    color: var(--language-accent);
}


/* Topic Programs List */
.pa-program-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pa-program-list-card {
    position: relative;
    display: flex;
    background: #fff;
    border: 1px solid #dce5f0;
    border-radius: 1rem;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.pa-program-list-card a {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    padding: 1.25rem 1.5rem;
    color: inherit;
    text-decoration: none;
}

.pa-program-list-card:hover, .pa-program-list-card:focus-within {
    transform: translateX(4px);
    border-color: color-mix(in srgb, var(--language-accent) 40%, transparent);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.pa-program-list-card:focus-within {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

.pa-program-list-icon {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    place-items: center;
    background: #f1f5f9;
    border-radius: 50%;
    color: #64748b;
    font-size: 1.2rem;
    transition: background-color 150ms ease, color 150ms ease;
}

.pa-program-list-card:hover .pa-program-list-icon {
    background: color-mix(in srgb, var(--language-accent) 10%, white);
    color: var(--language-accent);
}

.pa-program-list-content {
    flex: 1;
    min-width: 0;
}

.pa-program-list-content h2 {
    margin: 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: pre-wrap;
}

.pa-program-list-arrow {
    color: #cbd5e1;
    font-size: 1.2rem;
    transition: color 150ms ease;
}

.pa-program-list-card:hover .pa-program-list-arrow {
    color: var(--language-accent);
}

/* Single Program Detail Page */
.pa-program-detail {
    background: #fff;
    border: 1px solid #dce5f0;
    border-radius: 1.1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.pa-program-detail-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    font-weight: 800;
    line-height: 1.3;
}

.pa-program-output-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 0.85rem;
    padding: 0.85rem 1.1rem;
    color: #e2e8f0;
}

.pa-program-output-card h3 {
    color: #60a5fa;
    margin-bottom: 0.5rem;
}

.pa-output-box {
    background: #0b1220;
    border: 1px solid #1e293b;
    border-radius: 0.5rem;
    padding: 0.6rem 0.9rem !important;
    margin-block: 0 !important;
    overflow-x: auto;
    display: flex;
    align-items: flex-start;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    white-space: normal !important;
}

.pa-program-output-text {
    margin: 0;
    padding: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    /* Desktop: 15px, scales down to 13px on small screens */
    font-size: clamp(13px, 1.4vw + 9.5px, 15px);
    line-height: 1.5;
    color: #38bdf8;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1;
}

.pa-program-explanation-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 1.15rem;
}

.pa-program-nav-btn {
    border-radius: 0.65rem;
    padding: 0.6rem 1rem;
    transition: all 150ms ease;
}

.pa-program-nav-btn:hover {
    transform: translateY(-1px);
}

.pa-program-sidebar-list {
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 0.25rem;
}

.pa-program-sidebar-list li {
    padding-block: 0.2rem;
}

.pa-program-sidebar-list li.active a {
    color: var(--language-accent, #1769e0);
    font-weight: 750;
}

/* Minimalist Code Card Header Actions */
.pa-code-actions {
    gap: 0.35rem !important;
}

.pa-code-btn {
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.55rem;
    border-radius: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: color 150ms ease, background-color 150ms ease;
    text-decoration: none;
    line-height: 1;
}


.pa-code-btn:hover,
.pa-code-btn:focus-visible {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.pa-code-btn i {
    font-size: 0.95rem;
}

/* ─── Code Card (programs page) ─── */
.pa-example-box {
    overflow: hidden;
    background: #131722;
    border: 1px solid #2a3143;
    border-radius: 0.85rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.25);
    margin: 1.5rem 0;
}

.pa-example-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem 0.5rem 1rem;
    color: #e2e8f0;
    background: #131722;
    border-bottom: 0;
}

.pa-code-wrapper {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

/* Let Prism Tomorrow theme colors show; just strip its own background so
   the card's #131722 background shows through */
.pa-code-wrapper pre,
.pa-code-wrapper pre[class*="language-"],
.pa-code-wrapper code[class*="language-"] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.pa-code-wrapper pre,
.pa-code-wrapper pre[class*="language-"] {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 1rem 1rem 1rem !important;
    border-radius: 0 !important;
    /* Desktop: 16px, scales down to 13px on small screens */
    font-size: clamp(13px, 1.5vw + 10px, 16px) !important;
    line-height: 1.65 !important;
}

.pa-code-wrapper code[class*="language-"] {
    font-family: Consolas, "Courier New", monospace;
    font-size: inherit;
}

/* ================================================================
   RICH PROGRAM DETAIL SECTIONS
   ================================================================ */

/* ── Shared Section Header ── */
.pa-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #e2e8f0;
}

.pa-section-header i {
    font-size: 1.05rem;
    color: #1769e0;
    flex-shrink: 0;
}

.pa-section-header h3 {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 750;
    color: #0f172a;
    line-height: 1.2;
}

/* ── 1. Objective ── */
.pa-program-objective-card {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #1769e0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

.pa-program-objective-card .pa-section-header {
    border-bottom-color: #bfdbfe;
}

.pa-program-objective-card .pa-section-header i {
    color: #1769e0;
}

.pa-objective-text {
    margin: 0;
    color: #1e3a5f;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.7;
}

/* ── 2. Algorithm ── */
.pa-program-algorithm-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

.pa-algorithm-list {
    margin: 0;
    padding-left: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.pa-algorithm-list li {
    color: #334155;
    font-size: clamp(0.88rem, 1.5vw, 0.97rem);
    line-height: 1.65;
    padding-left: 0.3rem;
}

.pa-algorithm-list li::marker {
    color: #1769e0;
    font-weight: 700;
}

/* ── 4. Sample Input ── */
.pa-program-sample-input-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 0.85rem;
    padding: 0.85rem 1.1rem;
    color: #e2e8f0;
}

.pa-program-sample-input-card .pa-section-header {
    border-bottom-color: #1e293b;
}

.pa-program-sample-input-card .pa-section-header i,
.pa-program-sample-input-card .pa-section-header h3 {
    color: #7dd3fc;
}

.pa-sample-input-text {
    color: #7dd3fc !important;
}

/* ── 5. Output — section header override (dark card) ── */
.pa-program-output-card .pa-section-header {
    border-bottom-color: #1e293b;
}

.pa-program-output-card .pa-section-header i,
.pa-program-output-card .pa-section-header h3 {
    color: #60a5fa;
}

/* ── 6. Explanation (Tutorial Style) ── */
.pa-program-detail .pa-explanation-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 2.15rem 0 1rem;
    color: #107a53;
    font-size: clamp(1.45rem, 2vw, 1.85rem);
    font-weight: 500;
    line-height: 1.22;
}

.pa-program-detail .pa-explanation-title i {
    font-size: clamp(1.3rem, 1.8vw, 1.6rem);
}

.pa-program-detail .pa-explanation-box {
    padding: 1.4rem 1.6rem;
    margin: 0 0 1.65rem;
    color: #334155;
    background: #f8f9fa;
    border: 1px solid #f1f3f5;
    border-radius: 0.5rem;
}

.pa-program-detail .pa-explanation-box ul {
    margin: 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.pa-program-detail .pa-explanation-box li {
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    line-height: 1.6;
    color: #334155;
}

.pa-program-detail .pa-explanation-box code,
.pa-program-detail .pa-program-objective-card code,
.pa-program-detail .pa-program-algorithm-card code,
.pa-program-detail .pa-mistakes-box code {
    color: #d6336c;
    background: rgba(214, 51, 108, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9em;
}

.pa-program-explanation-body {
    color: #334155;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    line-height: 1.75;
}

/* ── 7. Complexity ── */
.pa-program-complexity-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

.pa-complexity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.pa-complexity-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.pa-complexity-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pa-complexity-label i {
    color: #1769e0;
    font-size: 0.9rem;
}

.pa-complexity-value {
    font-family: Consolas, "Courier New", monospace;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 700;
    color: #0f172a;
    background: #f0f7ff;
    border-radius: 0.35rem;
    padding: 0.25rem 0.6rem;
    display: inline-block;
    width: fit-content;
}

/* ── 8. Common Mistakes (Tutorial Style) ── */
.pa-program-detail .pa-mistakes-title {
    margin: 2.15rem 0 .8rem;
    color: #b42332 !important;
    font-size: clamp(1.45rem, 2vw, 1.85rem) !important;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -.02em;
}

.pa-program-detail .pa-mistakes-box {
    padding: 1rem 1.2rem;
    margin: 0 0 1.65rem;
    color: #343a40;
    background: #fff4e6;
    border: 1px solid #ffd09a;
    border-left: 4px solid #f08c00;
    border-radius: .65rem;
}

.pa-program-detail .pa-mistakes-box ul {
    margin: 0;
    padding-left: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pa-program-detail .pa-mistakes-box li {
    margin-bottom: .35rem;
    font-size: 1rem;
    line-height: 1.55;
    color: #343a40;
}

.pa-program-detail .pa-mistakes-box li:last-child {
    margin-bottom: 0;
}

/* ── 9. Related Tutorial ── */
.pa-program-related-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

.pa-related-tutorial-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #bfdbfe;
    border-radius: 0.6rem;
    padding: 0.85rem 1rem;
    color: #1769e0;
    font-weight: 600;
    font-size: clamp(0.88rem, 1.5vw, 0.97rem);
    text-decoration: none;
    transition: background 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

.pa-related-tutorial-link:hover {
    background: #eff6ff;
    box-shadow: 0 2px 8px rgba(23, 105, 224, 0.15);
    transform: translateY(-1px);
    color: #0d55b7;
    text-decoration: none;
}

.pa-related-tutorial-link > i:first-child {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ── Responsive tweaks ── */
@media (max-width: 576px) {
    .pa-program-objective-card,
    .pa-program-algorithm-card,
    .pa-program-complexity-card,
    .pa-program-detail .pa-mistakes-box,
    .pa-program-detail .pa-explanation-box,
    .pa-program-related-card,
    .pa-program-sample-input-card {
        padding: 0.85rem 1rem;
    }

    .pa-complexity-grid {
        grid-template-columns: 1fr;
    }
}
