
/* ============================================================
   ACE PAPER UI 0.8.8 — GLOBAL RENDERING STANDARD
   Presentation only. Source question content remains untouched.
   ============================================================ */

.ace-full-paper{
    --ace-green:#16a36a;
    --ace-green-2:#0f8f5d;
    --ace-ink:#17181a;
    --ace-muted:#6e7278;
    --ace-paper:#ffffff;
    --ace-page:#f5f5f7;
    --ace-line:#e6e7e9;
    --ace-answer-bg:linear-gradient(135deg,#f3fbf7 0%,#eaf8f1 100%);
    --ace-shadow:0 12px 36px rgba(20,25,30,.08);
    --ace-radius:14px;
    position:relative;
    width:100%;
    max-width:none;
    min-width:0;
    margin:0;
    padding:48px clamp(18px, 4vw, 58px) 64px;
    background:var(--ace-paper);
    color:var(--ace-ink);
    font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    font-size:16px;
    line-height:1.62;
    box-shadow:var(--ace-shadow);
    border:1px solid rgba(0,0,0,.055);
    border-radius:18px;
    overflow:visible;
}

body:has(.ace-full-paper){
    background:var(--ace-page);
}

.ace-full-paper *{box-sizing:border-box}
.ace-full-paper img{max-width:100%;height:auto}
.ace-full-paper table{max-width:100%;border-collapse:separate;border-spacing:0}
.ace-full-paper p{margin:0 0 1em}
.ace-full-paper strong,.ace-full-paper b{font-weight:700}

/* Global question hierarchy */
.ace-full-paper .ace-nav-question{
    scroll-margin-top:92px;
}
.ace-full-paper .ace-nav-question > :first-child{
    font-weight:650;
}
.ace-full-paper [data-question-number]{
    font-weight:700;
}

/* Sections */
.ace-full-paper .section-heading,
.ace-full-paper h1[id*="section" i],
.ace-full-paper h2[id*="section" i]{
    letter-spacing:-.025em;
}

/* Tables */
.ace-full-paper table{
    width:auto;
    min-width:60%;
    margin:22px auto;
    background:#fff;
    border:1px solid var(--ace-line);
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 8px 24px rgba(20,25,30,.055);
}
.ace-full-paper th{
    background:linear-gradient(180deg,#f7f8f9,#eef0f2);
    font-weight:700;
}
.ace-full-paper th,.ace-full-paper td{
    padding:11px 14px;
    border-right:1px solid var(--ace-line);
    border-bottom:1px solid var(--ace-line);
    vertical-align:top;
}
.ace-full-paper tr:last-child td{border-bottom:0}
.ace-full-paper th:last-child,.ace-full-paper td:last-child{border-right:0}

/* Figures */
.ace-full-paper img:not(.ace-no-lightbox){
    cursor:zoom-in;
    border-radius:10px;
    transition:transform .18s ease,box-shadow .18s ease;
}
.ace-full-paper img:not(.ace-no-lightbox):hover{
    box-shadow:0 12px 30px rgba(20,25,30,.13);
}

.ace-full-paper details > summary{
    cursor:pointer;
    list-style:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:8px 14px;
    margin:12px 0;
    border:1px solid rgba(15,143,93,.34);
    border-radius:10px;
    background:linear-gradient(180deg,#fff,#f4faf7);
    color:#086b45;
    font:700 13px/1.2 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;
    cursor:pointer;
}
.ace-full-paper details > summary::-webkit-details-marker{display:none}
.ace-full-paper details[open] > summary{background:linear-gradient(180deg,#f4faf7,#eaf8f1)}

/* Answer engine */
.ace-full-paper .show-answer,
.ace-full-paper .ace-show-answer,
.ace-full-paper .ace-answer-trigger,
.ace-full-paper [data-show-answer],
.ace-full-paper [data-ace-show-answer]{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:8px 14px;
    margin:12px 0;
    border:1px solid rgba(15,143,93,.34);
    border-radius:10px;
    background:linear-gradient(180deg,#fff,#f4faf7);
    color:#086b45;
    font:700 13px/1.2 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;
    letter-spacing:.01em;
    cursor:pointer;
    box-shadow:0 3px 10px rgba(15,143,93,.08);
    transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.ace-full-paper .show-answer:hover,
.ace-full-paper .ace-show-answer:hover,
.ace-full-paper .ace-answer-trigger:hover,
.ace-full-paper [data-show-answer]:hover,
.ace-full-paper [data-ace-show-answer]:hover{
    transform:translateY(-1px);
    box-shadow:0 7px 18px rgba(15,143,93,.14);
}
.ace-full-paper .show-answer:focus-visible,
.ace-full-paper .ace-show-answer:focus-visible{
    outline:3px solid rgba(22,163,106,.22);
    outline-offset:2px;
}

.ace-full-paper .answer,
.ace-full-paper .ace-answer,
.ace-full-paper [data-answer-panel],
.ace-full-paper [data-ace-answer]{
    display:none;
    margin:7px 0 24px;
    padding:19px 21px 20px;
    background:var(--ace-answer-bg);
    border:1px solid rgba(22,163,106,.13);
    border-left:4px solid var(--ace-green);
    border-radius:0 13px 13px 0;
    box-shadow:0 10px 28px rgba(22,163,106,.08);
}
.ace-full-paper details[open] > .answer,
.ace-full-paper details[open] > .ace-answer,
.ace-full-paper details[open] > [data-answer-panel],
.ace-full-paper details[open] > [data-ace-answer]{
    display:block;
    animation:aceAnswerIn .22s ease both;
}
.ace-full-paper .answer.is-open,
.ace-full-paper .ace-answer.is-open,
.ace-full-paper [data-answer-panel].is-open,
.ace-full-paper [data-ace-answer].is-open{
    display:block;
    animation:aceAnswerIn .22s ease both;
}
@keyframes aceAnswerIn{
    from{opacity:0;transform:translateY(-5px)}
    to{opacity:1;transform:translateY(0)}
}

/* Navigation */
.ace-paper-toolbar{
    position:sticky;
    top:0;
    z-index:50;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    min-height:58px;
    margin:-86px -58px 38px;
    padding:10px 16px;
    background:rgba(255,255,255,.88);
    border-bottom:1px solid rgba(0,0,0,.07);
    box-shadow:0 8px 24px rgba(20,25,30,.055);
    backdrop-filter:saturate(180%) blur(18px);
    -webkit-backdrop-filter:saturate(180%) blur(18px);
}
.ace-toolbar-brand{display:flex;align-items:center;gap:9px;font-size:12px;font-weight:750;letter-spacing:.07em;white-space:nowrap}
.ace-brand-mark{
    display:inline-grid;
    place-items:center;
    width:31px;height:31px;
    border-radius:9px;
    background:linear-gradient(145deg,#20b878,#0d8d5b);
    color:#fff;
    font-size:10px;
    letter-spacing:.03em;
}
.ace-toolbar-center{flex:1;text-align:center;color:var(--ace-muted);font-weight:650;font-size:13px}
.ace-toolbar-actions{display:flex;gap:6px}
.ace-ui-button{
    border:1px solid #dedfe1;
    background:rgba(255,255,255,.78);
    color:#313438;
    border-radius:9px;
    padding:7px 10px;
    font:650 11px/1.1 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;
    cursor:pointer;
}
.ace-ui-button:hover,.ace-ui-button.is-active{
    background:#f0f8f4;
    border-color:rgba(22,163,106,.35);
    color:#087348;
}

/* Desktop side navigation */
.ace-paper-navigation{
    position:fixed;
    z-index:40;
    top:115px;
    right:max(18px,calc((100vw - 1440px)/2));
    width:86px;
    max-height:calc(100vh - 145px);
    overflow:auto;
    padding:10px;
    background:rgba(255,255,255,.88);
    border:1px solid rgba(0,0,0,.07);
    border-radius:14px;
    box-shadow:0 12px 30px rgba(20,25,30,.08);
    backdrop-filter:blur(15px);
}
.ace-nav-title{
    padding:4px 2px 8px;
    color:#7a7e83;
    font-size:9px;
    font-weight:800;
    letter-spacing:.09em;
    text-align:center;
}
.ace-nav-list{display:grid;gap:4px}
.ace-nav-item{
    width:100%;
    border:0;
    border-radius:8px;
    background:transparent;
    color:#55595e;
    padding:6px 3px;
    font:650 11px/1.1 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;
    cursor:pointer;
}
.ace-nav-item:hover{background:#f1f3f4}
.ace-nav-item.is-active{
    background:#eaf8f1;
    color:#087348;
    box-shadow:inset 0 0 0 1px rgba(22,163,106,.12);
}

/* Mobile sheet */
.ace-mobile-sheet{display:none}
.ace-sheet-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.42)}
.ace-sheet-panel{
    position:absolute;
    left:0;right:0;bottom:0;
    max-height:78vh;
    overflow:auto;
    padding:9px 18px 24px;
    background:#fff;
    border-radius:20px 20px 0 0;
    box-shadow:0 -18px 50px rgba(0,0,0,.2);
}
.ace-sheet-handle{width:42px;height:4px;border-radius:99px;background:#c8c9cc;margin:2px auto 12px}
.ace-sheet-head{display:flex;justify-content:space-between;align-items:center;padding:4px 0 12px}
.ace-sheet-close{border:0;background:none;color:#087348;font-weight:700;cursor:pointer}
.ace-sheet-content{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.ace-sheet-content .ace-nav-item{padding:12px 4px;border:1px solid #e1e2e4;background:#fafafa}

/* Lightbox */
.ace-lightbox{
    position:fixed;
    inset:0;
    z-index:100000;
    display:none;
}
.ace-lightbox.is-open{display:block}
.ace-lightbox-backdrop{
    position:absolute;inset:0;
    background:rgba(5,7,9,.86);
    backdrop-filter:blur(10px);
}
.ace-lightbox-dialog{
    position:absolute;
    inset:5vh 5vw;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}
.ace-lightbox-stage{
    width:100%;
    height:calc(100% - 55px);
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:auto;
}
.ace-lightbox-stage img{
    max-width:95%;
    max-height:95%;
    object-fit:contain;
    transform-origin:center;
    transition:transform .15s ease;
    box-shadow:0 18px 60px rgba(0,0,0,.3);
}
.ace-lightbox-close{
    position:absolute;
    top:0;right:0;
    z-index:2;
    width:42px;height:42px;
    border:1px solid rgba(255,255,255,.2);
    border-radius:50%;
    background:rgba(255,255,255,.1);
    color:#fff;
    font-size:27px;
    cursor:pointer;
}
.ace-lightbox-controls{display:flex;gap:7px;margin-top:10px}
.ace-lightbox-controls button{
    min-width:42px;
    padding:7px 12px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:9px;
    background:rgba(255,255,255,.1);
    color:#fff;
    cursor:pointer;
}

/* Focus mode */
body.ace-focus-active{background:#fff}
.ace-full-paper.ace-focus-mode{
    max-width:900px;
    box-shadow:none;
    border-color:transparent;
}
.ace-full-paper.ace-focus-mode .ace-paper-navigation{display:none}
.ace-full-paper.ace-focus-mode .ace-paper-toolbar{margin-bottom:48px}

/* Dark mode */
.ace-full-paper.ace-dark-mode{
    --ace-paper:#151618;
    --ace-ink:#f2f2f5;
    --ace-muted:#a1a2a7;
    --ace-line:#303135;
    --ace-answer-bg:linear-gradient(135deg,#14231d,#102018);
    background:#151618;
    border-color:#292a2e;
    box-shadow:0 16px 44px rgba(0,0,0,.32);
}
.ace-full-paper.ace-dark-mode .ace-paper-toolbar{
    background:rgba(21,22,24,.88);
    border-color:#303135;
}
.ace-full-paper.ace-dark-mode .ace-ui-button{
    background:#1d1f22;color:#ddd;border-color:#36383d;
}
.ace-full-paper.ace-dark-mode table{
    background:#18191b;border-color:#303135;
}
.ace-full-paper.ace-dark-mode th{
    background:linear-gradient(180deg,#222428,#1c1e21);
}
.ace-full-paper.ace-dark-mode th,
.ace-full-paper.ace-dark-mode td{border-color:#303135}
.ace-full-paper.ace-dark-mode .show-answer,
.ace-full-paper.ace-dark-mode .ace-show-answer,
.ace-full-paper.ace-dark-mode .ace-answer-trigger,
.ace-full-paper.ace-dark-mode [data-show-answer],
.ace-full-paper.ace-dark-mode [data-ace-show-answer]{
    background:linear-gradient(180deg,#1b2822,#17231e);
    color:#74d7a9;
    border-color:#315b48;
}

/* Responsive */
@media(max-width:1250px){
    .ace-paper-navigation{display:none}
}
@media(max-width:760px){
    body:has(.ace-full-paper){background:#fff}
    .ace-full-paper{
        width:100%;
        max-width:none;
        margin:0;
        padding:74px 18px 55px;
        border:0;
        border-radius:0;
        box-shadow:none;
        font-size:16px;
    }
    .ace-paper-toolbar{
        margin:-74px -18px 30px;
        padding:9px 12px;
        min-height:55px;
    }
    .ace-toolbar-brand span:last-child{display:none}
    .ace-toolbar-actions{gap:3px}
    .ace-ui-button{padding:7px 8px;font-size:10px}
    .ace-ui-button[data-ace-show-all]{display:none}
    .ace-mobile-sheet{position:fixed;inset:0;z-index:99990;display:block;visibility:hidden;opacity:0;transition:opacity .18s ease}
    .ace-full-paper.ace-sheet-open .ace-mobile-sheet{visibility:visible;opacity:1}
    .ace-mobile-sheet .ace-sheet-panel{transform:translateY(100%);transition:transform .22s ease}
    .ace-full-paper.ace-sheet-open .ace-sheet-panel{transform:translateY(0)}
    .ace-full-paper table{display:block;overflow-x:auto;width:100%;white-space:normal}
    .ace-full-paper .answer,.ace-full-paper .ace-answer,
    .ace-full-paper [data-answer-panel],.ace-full-paper [data-ace-answer]{
        padding:16px;
    }
    .ace-lightbox-dialog{inset:3vh 3vw}
}
@media(prefers-reduced-motion:reduce){
    .ace-full-paper *, .ace-full-paper *::before, .ace-full-paper *::after{
        animation-duration:.01ms!important;
        transition-duration:.01ms!important;
        scroll-behavior:auto!important;
    }
}
@media print{
    body:has(.ace-full-paper){background:#fff}
    .ace-full-paper{
        max-width:none;
        padding:0;
        border:0;
        box-shadow:none;
        border-radius:0;
    }
    .ace-paper-toolbar,.ace-paper-navigation,.ace-mobile-sheet,.ace-lightbox{display:none!important}
    .ace-full-paper .answer,.ace-full-paper .ace-answer,
    .ace-full-paper [data-answer-panel],.ace-full-paper [data-ace-answer]{
        display:none!important;
    }
}


/* Legacy 0.8.8 access-gate styling removed. Locked papers use the current context-aware WooCommerce purchase card below. */

/* ============================================================
   ACE 0.8.8 — PLAIN FULL-WIDTH LEARNER PAPER
   The learner sees a normal continuous page, not a stack of cards.
   ============================================================ */
body:has(.ace-full-paper){
    background:#fff;
}

.ace-full-paper{
    width:100%;
    max-width:none;
    margin:0;
    padding:74px 5vw 80px;
    background:#fff;
    border:0;
    border-radius:0;
    box-shadow:none;
    overflow:visible;
}

.ace-full-paper .ace-paper-shell,
.ace-full-paper .ace-paper-content,
.ace-full-paper .ace-paper{
    width:100%;
    max-width:none;
    margin-left:0;
    margin-right:0;
    background:transparent;
    border:0;
    border-radius:0;
    box-shadow:none;
}

.ace-full-paper .ace-paper{
    padding:0;
}

/* Remove the old imported question-card treatment. */
.ace-full-paper .ace-question,
.ace-full-paper .question,
.ace-full-paper .question-item,
.ace-full-paper .ace-question-item,
.ace-full-paper .exam-question,
.ace-full-paper .paper-question{
    width:100%;
    max-width:none;
    margin:0 0 30px;
    padding:0;
    background:transparent;
    border:0;
    border-radius:0;
    box-shadow:none;
}

/* Keep the paper content vertically readable without artificial page boxes. */
.ace-full-paper .ace-cover,
.ace-full-paper .ace-instructions,
.ace-full-paper .ace-context,
.ace-full-paper .ace-section-title{
    width:100%;
    max-width:none;
    margin-left:0;
    margin-right:0;
    background:transparent;
    border:0;
    border-radius:0;
    box-shadow:none;
}

.ace-full-paper .ace-section-title{
    padding-left:0;
    padding-right:0;
}

.ace-full-paper .ace-cover{
    padding-left:0;
    padding-right:0;
}

.ace-full-paper .ace-instructions{
    padding-left:0;
    padding-right:0;
}

/* Do not let legacy embedded styles recreate narrow paper cards. */
.ace-full-paper .ace-paper-content > .ace-paper{
    max-width:none !important;
    padding-left:0 !important;
    padding-right:0 !important;
    border:0 !important;
    box-shadow:none !important;
    border-radius:0 !important;
}

/* Answers remain visually distinct, but are not paper/question cards. */
.ace-full-paper .answer,
.ace-full-paper .ace-answer,
.ace-full-paper [data-answer-panel],
.ace-full-paper [data-ace-answer]{
    max-width:none;
    border-radius:0 10px 10px 0;
    box-shadow:none;
}

@media(max-width:760px){
    .ace-full-paper{
        width:100%;
        max-width:none;
        margin:0;
        padding:70px 18px 50px;
        border:0;
        border-radius:0;
        box-shadow:none;
    }
}

@media print{
    .ace-full-paper{
        width:100%;
        max-width:none;
        padding:0;
        border:0;
        border-radius:0;
        box-shadow:none;
    }
}

/* 0.8.8 paper-integrity guard. Imported source text must remain visible; only
   the answer layer is allowed to start hidden. */
.ace-fpp-render-scope .ace-fpp-question,
.ace-fpp-render-scope .ace-fpp-question-text,
.ace-fpp-render-scope .ace-fpp-question-number,
.ace-fpp-render-scope .ace-fpp-subquestion,
.ace-fpp-render-scope .ace-fpp-marks,
.ace-fpp-render-scope .ace-fpp-visual,
.ace-fpp-render-scope .ace-fpp-options,
.ace-fpp-render-scope .ace-fpp-section,
.ace-fpp-render-scope .ace-fpp-total,
.ace-fpp-render-scope .ace-fpp-container,
.ace-fpp-render-scope .ace-fpp-instructions,
.ace-fpp-render-scope .ace-fpp-cover,
.ace-fpp-render-scope .ace-fpp-context,
.ace-fpp-render-scope .ace-fpp-caption,
.ace-fpp-render-scope .ace-fpp-checklist,
.ace-fpp-render-scope .ace-fpp-meta,
.ace-fpp-render-scope .ace-fpp-extract-title,
.ace-fpp-render-scope .ace-fpp-confidential,
.ace-fpp-render-scope .ace-fpp-math,
.ace-fpp-render-scope .ace-fpp-small{
    visibility:visible;
    opacity:1;
}
.ace-fpp-render-scope .ace-fpp-question-text{
    display:block;
}


/* 0.8.9 full-width paper layout fix.
   The rendered paper must use the available LearnDash/content column width,
   not impose the previous 1080px centered document-card limit. */
.ace-fpp-render-scope,
.ace-paper-shell,
.ace-paper-content,
.ace-paper-content > .ace-paper,
.ace-full-paper {
    display: block;
    width: 100%;
    max-width: none !important;
    min-width: 0;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}
.ace-paper-shell,
.ace-paper-content {
    overflow: visible;
}
.ace-full-paper .ace-paper-shell,
.ace-full-paper .ace-paper-content,
.ace-full-paper .ace-paper {
    width: 100%;
    max-width: none !important;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}
.ace-full-paper img,
.ace-fpp-render-scope img {
    max-width: 100%;
    height: auto;
}
.ace-full-paper table,
.ace-fpp-render-scope table {
    max-width: 100%;
}
.ace-full-paper .row,
.ace-full-paper .column,
.ace-full-paper .paper-body,
.ace-fpp-render-scope .row,
.ace-fpp-render-scope .column,
.ace-fpp-render-scope .paper-body {
    min-width: 0;
}
@media (max-width: 760px) {
    .ace-full-paper {
        padding: 28px 14px 40px;
    }
}

/* ACE Commerce universal item + monthly plan actions */
.ace-fpp-commerce-actions{display:flex;flex-wrap:wrap;gap:.65rem;margin-top:1rem}
.ace-fpp-commerce-actions .button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:.7rem 1rem;border-radius:12px;text-decoration:none;font-weight:650;box-shadow:0 5px 16px rgba(15,23,42,.12)}
.ace-fpp-commerce-actions .ace-fpp-buy-item-button{background:#1769e0;color:#fff}
.ace-fpp-commerce-actions .ace-fpp-subscription-button{background:#28243f;color:#fff;border:1px solid rgba(124,92,230,.55)}
.ace-fpp-commerce-actions .button:hover{filter:brightness(1.08);transform:translateY(-1px)}


/* ACE Commerce purchase gate — consistent dark, context-aware card */
.ace-fpp-access-gate{
    min-height:0;
    display:block;
    padding:28px 16px;
    background:transparent;
    font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
.ace-fpp-access-card.ace-fpp-context-card{
    box-sizing:border-box;
    width:min(980px,100%);
    margin:0 auto;
    padding:24px;
    text-align:left;
    color:#f8fafc;
    background:#111827;
    border:1px solid #303949;
    border-radius:22px;
    box-shadow:none;
}
.ace-fpp-context-card .ace-fpp-access-badge{
    display:inline-flex;
    width:auto;
    height:auto;
    min-height:24px;
    margin:0 0 14px;
    padding:6px 12px;
    border-radius:999px;
    background:#991b1b;
    color:#fff;
    font-size:11px;
    letter-spacing:.02em;
}
.ace-fpp-context-card h2{
    margin:0 0 8px;
    color:#fff;
    font-size:26px;
    line-height:1.25;
}
.ace-fpp-context-card p{
    max-width:none;
    margin:0 0 14px;
    color:#d1d5db;
    line-height:1.6;
}
.ace-fpp-context-card .ace-fpp-gate-context{
    margin-bottom:16px;
    color:#cbd5e1;
    font-size:14px;
}
.ace-fpp-context-card .ace-fpp-gate-product-name{
    margin:18px 0 4px;
    color:#fff;
    font-size:18px;
}
.ace-fpp-context-card .ace-fpp-gate-price{
    margin:4px 0 12px;
    color:#fff;
    font-size:26px;
    font-weight:800;
    line-height:1.25;
}
.ace-fpp-context-card .ace-fpp-gate-benefits{
    margin:12px 0 22px 1.2em;
    padding:0;
    color:#f3f4f6;
}
.ace-fpp-context-card .ace-fpp-gate-benefits li{
    margin:0 0 8px;
    padding-left:2px;
    color:#f3f4f6;
    line-height:1.5;
}
.ace-fpp-context-card .ace-fpp-gate-cta{margin:18px 0 8px}
.ace-fpp-context-card a.ace-fpp-primary-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:0 20px;
    border:0;
    border-radius:999px;
    background:#c51f25;
    color:#fff;
    font-weight:800;
    text-decoration:none;
}
.ace-fpp-context-card a.ace-fpp-primary-button:hover,
.ace-fpp-context-card a.ace-fpp-primary-button:focus{
    background:#a91920;
    color:#fff;
}
.ace-fpp-context-card a.ace-fpp-secondary-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    margin-left:8px;
    padding:0 20px;
    border:1px solid #374151;
    border-radius:999px;
    background:#000;
    color:#fff;
    font-weight:800;
    text-decoration:none;
}
.ace-fpp-context-card a.ace-fpp-secondary-button:hover,
.ace-fpp-context-card a.ace-fpp-secondary-button:focus{
    background:#1f2937;
    color:#fff;
}
.ace-fpp-context-card .ace-fpp-gate-comparison{
    margin-top:22px;
    padding:18px;
    border:1px solid #374151;
    border-radius:16px;
    background:#1b2433;
}
.ace-fpp-context-card .ace-fpp-gate-comparison h3{
    margin:0 0 8px;
    color:#fff;
    font-size:18px;
}
.ace-fpp-context-card .ace-fpp-gate-alternative-price{
    margin:8px 0;
    color:#fff;
    font-size:20px;
    font-weight:800;
}
.ace-fpp-context-card .ace-fpp-gate-comparison .ace-fpp-gate-renewal{
    margin-bottom:0;
    font-size:12px;
}
.ace-fpp-context-card .ace-fpp-gate-secure{
    margin:16px 0 0;
    font-size:12px;
    text-align:center;
    color:#cbd5e1;
}
.ace-fpp-context-card .ace-fpp-gate-config-warning{
    margin:16px 0;
    padding:12px;
    border:1px solid #92400e;
    border-radius:10px;
    color:#fde68a;
    background:#451a03;
}
@media(max-width:600px){
    .ace-fpp-access-gate{padding:18px 8px}
    .ace-fpp-access-card.ace-fpp-context-card{padding:20px 16px;border-radius:16px}
    .ace-fpp-context-card h2{font-size:22px}
}


/* 2.1.6.9: keep the paper-library purchase CTA correctly shaped even when
   the active theme applies restrictive global button styles. */
.ace-fpp-access-gate .ace-fpp-context-card a.ace-fpp-primary-button,
.ace-fpp-access-gate .ace-fpp-context-card a.ace-fpp-secondary-button {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 12px 22px !important;
    line-height: 1.25 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    vertical-align: middle;
}
.ace-fpp-access-gate .ace-fpp-context-card a.ace-fpp-primary-button {
    border-radius: 999px !important;
    background: #c51f25 !important;
    color: #fff !important;
}
.ace-fpp-access-gate .ace-fpp-context-card a.ace-fpp-primary-button:hover {
    background: #a9181e !important;
    color: #fff !important;
}


/* ============================================================
   Native learner-guide answer disclosures
   Fix: .answer may be either a legacy answer panel OR a
   <details class="answer"> disclosure wrapper. Never hide the
   wrapper; hide only its answer content until it is opened.
   ============================================================ */
.ace-full-paper details.answer{
    display:block !important;
    margin:12px 0 24px;
    padding:0;
    overflow:visible;
}
.ace-full-paper details.answer > summary{
    display:flex;
    width:fit-content;
    max-width:100%;
    min-height:40px;
    margin:12px 0 0;
    padding:10px 15px;
    cursor:pointer;
    list-style:none;
    user-select:none;
}
.ace-full-paper details.answer > summary::-webkit-details-marker{
    display:none;
}
.ace-full-paper details.answer > .answer-content{
    display:none;
    margin:0;
    padding:12px 18px 16px;
    background:var(--ace-answer-bg);
    border:1px solid rgba(22,163,106,.16);
    border-left:4px solid var(--ace-green);
    border-radius:0 12px 12px 12px;
    color:var(--ace-ink);
}
.ace-full-paper details.answer[open] > .answer-content{
    display:block !important;
    animation:aceAnswerIn .22s ease both;
}
@media print{
    .ace-full-paper details.answer,
    .ace-full-paper details.answer > .answer-content{
        display:block !important;
    }
    .ace-full-paper details.answer > summary{
        display:none !important;
    }
}
