:root {
    --apqp-red: #c81d25;
    --apqp-red-dark: #9f151b;
    --apqp-ink: #171717;
    --apqp-copy: #4b5563;
    --apqp-muted: #6b7280;
    --apqp-line: #e5e7eb;
    --apqp-soft: #fff8f7;
    --apqp-panel: #f7f8fa;
}

html {
    scroll-behavior: smooth;
}

.apqp-page {
    color: var(--apqp-ink);
    background: #fff;
}

.apqp-main a:focus-visible,
.apqp-main button:focus-visible {
    outline: 3px solid rgba(200, 29, 37, 0.28);
    outline-offset: 3px;
}

.apqp-main {
    padding-top: 56px;
}

.apqp-wrap {
    width: min(1140px, calc(100% - 40px));
    margin: 0 auto;
}

.apqp-anchor,
#scenario-selection,
#related-courses,
#expert-selection,
#decision-example,
#faq {
    scroll-margin-top: 76px;
}

.apqp-hero {
    padding: 36px 0 0;
    background: linear-gradient(180deg, #fff 0%, #fffafa 100%);
    border-bottom: 1px solid #f0eeee;
}

.apqp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    color: var(--apqp-muted);
    font-size: 13px;
}

.apqp-breadcrumb a {
    color: var(--apqp-muted);
    text-decoration: none;
}

.apqp-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 56px;
    align-items: start;
}

.apqp-eyebrow {
    display: inline-block;
    margin: 0 0 16px;
    padding: 5px 10px;
    color: var(--apqp-red);
    border: 1px solid #f1c7c9;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

.apqp-hero h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.2;
    letter-spacing: 0;
}

.apqp-lead {
    max-width: 760px;
    margin: 20px 0 0;
    color: #333;
    font-size: 17px;
    line-height: 1.85;
}

.apqp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.apqp-primary,
.apqp-secondary,
.apqp-bottom-cta > a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.apqp-primary,
.apqp-bottom-cta > a {
    color: #fff;
    background: var(--apqp-red);
}

.apqp-primary:hover,
.apqp-bottom-cta > a:hover {
    background: var(--apqp-red-dark);
}

.apqp-secondary {
    min-width: 126px;
    color: var(--apqp-ink);
    background: #fff;
    border: 1px solid #d1d5db;
}

.apqp-secondary:hover {
    color: var(--apqp-red);
    border-color: #e5a8ab;
    background: var(--apqp-soft);
}

.apqp-hero-aside {
    padding: 24px;
    border: 1px solid var(--apqp-line);
    border-radius: 7px;
    background: #fff;
}

.apqp-hero-aside h2 {
    margin: 0 0 18px;
    font-size: 18px;
}

.apqp-hero-aside dl,
.apqp-hero-aside dd {
    margin: 0;
}

.apqp-hero-aside dl {
    display: grid;
    gap: 14px;
}

.apqp-hero-aside dl > div {
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.apqp-hero-aside dl > div:first-child {
    padding-top: 0;
    border-top: 0;
}

.apqp-hero-aside dt {
    margin-bottom: 4px;
    color: var(--apqp-red);
    font-size: 13px;
    font-weight: 700;
}

.apqp-hero-aside dd {
    color: var(--apqp-copy);
    font-size: 14px;
    line-height: 1.65;
}

.apqp-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 42px 0 0;
    padding: 24px 0 30px;
}

.apqp-facts > div {
    padding-left: 26px;
    border-left: 1px solid var(--apqp-line);
}

.apqp-facts > div:first-child {
    padding-left: 0;
    border-left: 0;
}

.apqp-facts dt {
    color: var(--apqp-red);
    font-size: 24px;
    font-weight: 800;
}

.apqp-facts dd {
    margin: 5px 0 0;
    color: var(--apqp-muted);
    font-size: 13px;
}

.apqp-section {
    padding-top: 46px;
}

.apqp-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.apqp-section-head h2 {
    position: relative;
    margin: 0;
    padding-left: 13px;
    font-size: 25px;
    line-height: 1.35;
}

.apqp-section-head h2::before {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 4px;
    border-radius: 2px;
    background: var(--apqp-red);
    content: '';
}

.apqp-section-head p {
    max-width: 560px;
    margin: 0;
    color: var(--apqp-muted);
    font-size: 14px;
    line-height: 1.7;
}

.apqp-scenario-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.apqp-scenario-card {
    padding: 22px;
    border: 1px solid var(--apqp-line);
    border-radius: 7px;
    background: #fff;
}

.apqp-scenario-card > span {
    display: inline-block;
    padding: 3px 8px;
    color: var(--apqp-red);
    border: 1px solid #f2c7ca;
    border-radius: 4px;
    background: var(--apqp-soft);
    font-size: 12px;
    font-weight: 700;
}

.apqp-scenario-card h3 {
    margin: 14px 0 8px;
    font-size: 17px;
    line-height: 1.5;
}

.apqp-scenario-card p {
    margin: 0;
    color: var(--apqp-copy);
    font-size: 14px;
    line-height: 1.75;
}

.apqp-inline-links {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.apqp-inline-links a {
    color: var(--apqp-red);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
}

.apqp-tabs {
    display: flex;
    gap: 26px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--apqp-line);
}

.apqp-tabs button {
    position: relative;
    padding: 0 4px 12px;
    color: var(--apqp-copy);
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.apqp-tabs button.active {
    color: var(--apqp-red);
    font-weight: 700;
}

.apqp-tabs button.active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--apqp-red);
    content: '';
}

.apqp-course-list {
    display: grid;
    gap: 14px;
}

.apqp-course-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 265px;
    border: 1px solid var(--apqp-line);
    border-radius: 7px;
    background: #fff;
    overflow: hidden;
}

.apqp-course-main {
    padding: 22px;
}

.apqp-course-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.apqp-course-head > a {
    color: var(--apqp-ink);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.45;
    text-decoration: none;
}

.apqp-course-head > a:hover,
.apqp-course-side > a:hover,
.apqp-expert-name:hover,
.apqp-expert-courses a:hover {
    color: var(--apqp-red);
}

.apqp-course-head > span {
    flex: 0 0 auto;
    padding: 3px 8px;
    color: var(--apqp-red);
    border: 1px solid #f2c7ca;
    border-radius: 4px;
    background: var(--apqp-soft);
    font-size: 12px;
}

.apqp-course-main > p {
    margin: 10px 0 0;
    color: var(--apqp-copy);
    font-size: 14px;
    line-height: 1.75;
}

.apqp-course-check {
    padding: 10px 12px;
    background: var(--apqp-soft);
}

.apqp-course-check strong {
    margin-right: 8px;
    color: var(--apqp-red);
}

.apqp-course-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
    border-left: 1px solid var(--apqp-line);
    background: #fcfcfc;
}

.apqp-course-side > span {
    color: var(--apqp-muted);
    font-size: 12px;
}

.apqp-course-side > a:not(.apqp-detail),
.apqp-course-side > strong {
    margin-top: 6px;
    color: var(--apqp-ink);
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
}

.apqp-course-side small {
    margin-top: 4px;
    color: var(--apqp-muted);
}

.apqp-detail {
    margin-top: auto;
    padding-top: 26px;
    color: var(--apqp-red);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.apqp-expert-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.apqp-expert-card {
    display: flex;
    min-height: 240px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--apqp-line);
    border-radius: 7px;
}

.apqp-expert-name {
    display: block;
    margin-top: 12px;
    color: var(--apqp-ink);
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
}

.apqp-expert-class {
    display: inline-block;
    padding: 3px 8px;
    color: var(--apqp-red);
    border: 1px solid #f2c7ca;
    border-radius: 4px;
    background: var(--apqp-soft);
    font-size: 12px;
    font-weight: 700;
}

.apqp-expert-card p {
    margin: 10px 0 0;
    color: var(--apqp-copy);
    font-size: 14px;
    line-height: 1.7;
}

.apqp-expert-courses {
    display: grid;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--apqp-line);
}

.apqp-expert-courses a {
    color: var(--apqp-red);
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none;
}

.apqp-decision {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--apqp-line);
    border-radius: 7px;
    overflow: hidden;
}

.apqp-decision > div {
    padding: 22px;
    border-left: 1px solid var(--apqp-line);
}

.apqp-decision > div:first-child {
    border-left: 0;
}

.apqp-decision span {
    color: var(--apqp-red);
    font-size: 13px;
    font-weight: 800;
}

.apqp-decision p {
    margin: 10px 0 0;
    color: var(--apqp-copy);
    font-size: 14px;
    line-height: 1.75;
}

.apqp-faq details {
    border-top: 1px solid var(--apqp-line);
}

.apqp-faq details:last-child {
    border-bottom: 1px solid var(--apqp-line);
}

.apqp-faq summary {
    padding: 17px 4px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.apqp-faq details p {
    margin: 0;
    padding: 0 4px 18px;
    color: var(--apqp-copy);
    font-size: 14px;
    line-height: 1.8;
}

.apqp-bottom-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-top: 48px;
    margin-bottom: 52px;
    padding: 28px 32px;
    border: 1px solid #f0cdcf;
    border-radius: 7px;
    background: var(--apqp-soft);
}

.apqp-bottom-cta h2 {
    margin: 0;
    font-size: 21px;
}

.apqp-bottom-cta p {
    margin: 8px 0 0;
    color: var(--apqp-copy);
    font-size: 14px;
    line-height: 1.7;
}

.apqp-course-card[hidden] {
    display: none;
}

.apqp-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.apqp-related-card {
    display: flex;
    min-height: 250px;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--apqp-line);
    border-radius: 7px;
    background: #fff;
}

.apqp-related-card > span {
    align-self: flex-start;
    padding: 3px 8px;
    color: var(--apqp-red);
    border: 1px solid #f2c7ca;
    border-radius: 4px;
    background: var(--apqp-soft);
    font-size: 12px;
    font-weight: 700;
}

.apqp-related-card > a {
    margin-top: 12px;
    color: var(--apqp-ink);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.5;
    text-decoration: none;
}

.apqp-related-card > a:hover,
.apqp-related-card > div a:hover {
    color: var(--apqp-red);
}

.apqp-related-card > p {
    margin: 10px 0 18px;
    color: var(--apqp-copy);
    font-size: 14px;
    line-height: 1.7;
}

.apqp-related-card > div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--apqp-line);
}

.apqp-related-card > div small {
    color: var(--apqp-muted);
}

.apqp-related-card > div strong {
    font-size: 14px;
}

.apqp-related-card > div a {
    grid-column: 1 / -1;
    margin-top: 6px;
    color: var(--apqp-red);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 900px) {
    .apqp-main {
        padding-top: 105px;
    }

    .apqp-anchor,
    #scenario-selection,
    #related-courses,
    #expert-selection,
    #decision-example,
    #faq {
        scroll-margin-top: 124px;
    }

    .apqp-hero-grid,
    .apqp-course-card {
        grid-template-columns: 1fr;
    }

    .apqp-hero-aside {
        display: none;
    }

    .apqp-scenario-grid,
    .apqp-related-grid,
    .apqp-expert-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apqp-course-side {
        min-height: 118px;
        border-top: 1px solid var(--apqp-line);
        border-left: 0;
    }

    .apqp-detail {
        margin-top: 18px;
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    .apqp-wrap {
        width: min(100% - 28px, 1140px);
    }

    .apqp-hero {
        padding-top: 20px;
    }

    .apqp-breadcrumb {
        margin-bottom: 20px;
    }

    .apqp-hero h1 {
        font-size: 32px;
    }

    .apqp-lead {
        font-size: 16px;
        line-height: 1.75;
    }

    .apqp-actions > a {
        width: 100%;
    }

    .apqp-facts {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 20px;
        margin-top: 30px;
    }

    .apqp-facts > div:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

    .apqp-section {
        padding-top: 38px;
    }

    .apqp-section-head {
        display: block;
    }

    .apqp-section-head h2 {
        font-size: 22px;
    }

    .apqp-section-head p {
        margin-top: 10px;
    }

    .apqp-scenario-grid,
    .apqp-related-grid,
    .apqp-expert-grid,
    .apqp-decision {
        grid-template-columns: 1fr;
    }

    .apqp-tabs {
        gap: 18px;
        overflow-x: auto;
    }

    .apqp-tabs button {
        flex: 0 0 auto;
    }

    .apqp-course-head {
        display: block;
    }

    .apqp-course-head > a {
        display: block;
        font-size: 18px;
    }

    .apqp-course-head > span {
        display: inline-block;
        margin-top: 10px;
    }

    .apqp-decision > div {
        border-top: 1px solid var(--apqp-line);
        border-left: 0;
    }

    .apqp-decision > div:first-child {
        border-top: 0;
    }

    .apqp-bottom-cta {
        display: block;
        padding: 24px;
    }

    .apqp-bottom-cta > a {
        width: 100%;
        margin-top: 18px;
    }
}
