/* =========================================================
   PULSE-ART — PDP Help page  (modules-PDP-help.html)
   Screen + print styles. Works with css/pulse-art.css (brand colours).
   ========================================================= */

.hk-page {
    --hk-pink: #9c1c6b;
    --hk-navy: #171940;
    --hk-ink: #2b2d42;
    --hk-muted: #5d6075;
    --hk-line: rgba(23, 25, 64, .12);
    --hk-soft: #f7f5fa;
    --m1: #1d7a6b;
    --m2: #d2601a;
    --m3: #b5263a;
    --m4: #3b48b5;
    --m5: #8a7522;
    --m6: #8e4a9c;
    font-family: "Inter", "Noto Sans", sans-serif;
    color: var(--hk-ink);
    line-height: 1.6;
}

.hk-page[dir="rtl"] { text-align: right; }

/* ---------- toolbar (language + print) ---------- */
.hk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    margin: 0 0 2rem;
    padding: .9rem 1.1rem;
    border: 1px solid var(--hk-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 25, 64, .06);
}
.hk-lang { display: flex; align-items: center; gap: .6rem; margin: 0; font-weight: 700; color: var(--hk-navy); }
.hk-lang select {
    min-width: 13rem;
    padding: .55rem .9rem;
    border: 1px solid rgba(23, 25, 64, .25);
    border-radius: 10px;
    background: #fff;
    font-weight: 600;
}
.hk-print-btn, .hk-back-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.1rem;
    border: 1px solid var(--hk-pink);
    border-radius: 999px;
    background: #fff;
    color: var(--hk-pink);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.hk-print-btn:hover, .hk-back-btn:hover { background: var(--hk-pink); color: #fff; }

/* ---------- intro ---------- */
.hk-intro { max-width: 52rem; margin: 0 auto 2.25rem; font-size: 1.12rem; color: var(--hk-ink); }

/* ---------- quick start ---------- */
.hk-quick {
    margin: 0 auto 2.75rem;
    padding: 1.75rem clamp(1rem, 3vw, 2.25rem);
    border-radius: 24px;
    background: var(--hk-soft);
}
.hk-quick h2 {
    margin: 0 0 1.25rem;
    font-size: 1.05rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--hk-pink);
}
.hk-quick-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: hkq;
}
.hk-quick-list li {
    position: relative;
    padding: 2.9rem .9rem .9rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(23, 25, 64, .07);
    font-size: .95rem;
    line-height: 1.45;
    counter-increment: hkq;
}
.hk-quick-list li::before {
    content: counter(hkq);
    position: absolute;
    top: .8rem;
    inset-inline-start: .9rem;
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--hk-pink);
    color: #fff;
    font-weight: 800;
    font-size: .95rem;
}
.hk-quick-list li:nth-child(2)::before { background: #3f43b0; }
.hk-quick-list li:nth-child(3)::before { background: var(--hk-navy); }
.hk-quick-list li:nth-child(4)::before { background: #b01f7c; }
.hk-quick-list li:nth-child(5)::before { background: #e0287f; }

/* ---------- table of contents ---------- */
.hk-toc {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .6rem;
    margin: 0 auto 2.5rem;
    padding: 0;
    list-style: none;
}
.hk-toc a {
    display: inline-block;
    padding: .35rem .85rem;
    border: 1px solid var(--hk-line);
    border-radius: 999px;
    color: var(--hk-navy);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}
.hk-toc a:hover { border-color: var(--hk-pink); color: var(--hk-pink); }

/* ---------- sections ---------- */
.hk-section { margin: 0 0 2.75rem; scroll-margin-top: 110px; }
.hk-section > h2 {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 .35rem;
    padding-bottom: .6rem;
    border-bottom: 2px solid var(--hk-line);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--hk-navy);
}
.hk-num {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--hk-pink);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
}
.hk-lead { margin: .8rem 0 1rem; color: var(--hk-muted); }

.hk-steps { margin: 1rem 0; padding-inline-start: 1.4rem; }
.hk-steps li { margin: 0 0 .65rem; padding-inline-start: .25rem; }
.hk-steps li::marker { color: var(--hk-pink); font-weight: 800; }

.hk-note {
    margin: 1.1rem 0 0;
    padding: .85rem 1.1rem;
    border-inline-start: 4px solid var(--hk-pink);
    border-radius: 0 12px 12px 0;
    background: #fbf7fa;
}
.hk-page[dir="rtl"] .hk-note { border-radius: 12px 0 0 12px; }
.hk-note strong { color: var(--hk-pink); }

/* UI names and keys */
.hk-ui {
    display: inline-block;
    padding: .05rem .55rem;
    border: 1px solid rgba(23, 25, 64, .22);
    border-radius: 7px;
    background: #fff;
    color: var(--hk-navy);
    font-size: .88em;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}
kbd {
    display: inline-block;
    min-width: 1.7em;
    padding: .05rem .5rem;
    border: 1px solid #b9bcc9;
    border-bottom-width: 3px;
    border-radius: 6px;
    background: #fff;
    color: var(--hk-navy);
    font: 700 .88em "Inter", sans-serif;
    text-align: center;
}

/* ---------- learning-area map ---------- */
.hk-map-wrap { margin: 1.25rem 0 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.hk-map {
    position: relative;
    padding: .9rem 1.6rem .9rem 1.9rem;
    border: 1px solid var(--hk-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(23, 25, 64, .07);
    font-size: .78rem;
    direction: ltr;
    text-align: left;
}
.hk-map * { box-sizing: border-box; }
.hk-m-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .8rem .9rem;
    border-radius: 12px;
    background: linear-gradient(120deg, var(--m5), #b9a95a);
    color: #fff;
}
.hk-m-head b { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #efe9d0; color: var(--m5); font-size: .7rem; }
.hk-m-head span { font-weight: 700; font-size: .85rem; }
.hk-m-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; margin: .7rem 0 .6rem; }
.hk-m-modules { display: flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--hk-muted); }
.hk-m-modules i { font-style: normal; padding: 0 .35rem; border-inline-end: 1px solid #ccc; }
.hk-m-modules i:last-child { border: 0; }
.hk-m-modules i.on { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; padding: 0; border-radius: 50%; background: var(--m5); color: #fff; border: 0; }
.hk-m-btns { display: flex; gap: .4rem; }
.hk-m-chip { padding: .22rem .65rem; border: 1px solid var(--hk-line); border-radius: 999px; background: #fff; font-weight: 700; color: var(--hk-navy); white-space: nowrap; }
.hk-m-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; margin-bottom: .6rem; padding-bottom: .6rem; border-bottom: 1px solid var(--hk-line); }
.hk-m-layout { display: grid; grid-template-columns: 30% 1fr; gap: .6rem; }
.hk-m-side { padding: .6rem; border: 1px solid var(--hk-line); border-radius: 12px; background: #fbfafd; }
.hk-m-side h6 { margin: 0 0 .4rem; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--hk-navy); }
.hk-m-side div { display: flex; align-items: center; gap: .35rem; padding: .22rem 0; color: var(--hk-muted); font-size: .7rem; }
.hk-m-side div b { width: 1.2rem; height: 1.2rem; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: .55rem; }
.hk-m-side .cur { margin-inline: -.3rem; padding-inline: .3rem; border-radius: 6px; background: #efe9d0; color: var(--hk-navy); font-weight: 700; }
.hk-m-main { position: relative; padding: .6rem 1rem .6rem 1.1rem; border: 1px solid var(--hk-line); border-top: 4px solid var(--m5); border-radius: 12px; }
.hk-m-audio { display: flex; justify-content: flex-end; gap: .35rem; margin-bottom: .45rem; }
.hk-m-progress { height: 7px; margin-bottom: .2rem; border-radius: 99px; background: #e6e3ee; overflow: hidden; }
.hk-m-progress i { display: block; width: 23%; height: 100%; background: var(--m5); }
.hk-m-count { margin-bottom: .5rem; color: var(--hk-muted); font-size: .68rem; }
.hk-m-title { margin: 0 0 .4rem; font-weight: 800; font-size: .85rem; color: var(--hk-navy); }
.hk-m-lines i { display: block; height: 6px; margin: .32rem 0; border-radius: 4px; background: #e8e6ef; }
.hk-m-lines i:nth-child(2n) { width: 88%; }
.hk-m-lines i:nth-child(3n) { width: 70%; }
.hk-m-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .5rem; }
.hk-m-boxes i { display: block; height: 2.1rem; border: 2px solid #e8b81c; border-radius: 4px; }
.hk-m-boxes i + i { border-color: #d4469a; }
.hk-m-nav { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-top: .7rem; }
.hk-m-nav .ok { color: #16803c; font-weight: 700; }
.hk-m-nav .nx { padding: .3rem .8rem; border-radius: 8px; background: var(--m5); color: #fff; font-weight: 700; }
.hk-m-nav .pv { padding: .3rem .8rem; border: 1px solid var(--m5); border-radius: 8px; color: var(--m5); font-weight: 700; }

.hk-pin {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--hk-pink);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    top: 50%;
    transform: translateY(-50%);
    left: -1.55rem;
}
.hk-m-head, .hk-m-strip, .hk-m-bar, .hk-m-side, .hk-m-audio, .hk-m-lesson, .hk-m-nav { position: relative; }
/* 4 sits on the corner of the contents box; 5, 6, 7 sit in the gutter of the lesson box */
.hk-m-side .hk-pin { top: -.55rem; left: -.55rem; transform: none; }
.hk-m-audio .hk-pin, .hk-m-nav .hk-pin { left: auto; right: -1.5rem; }
.hk-m-lesson .hk-pin { top: .1rem; left: -1.5rem; transform: none; }

.hk-legend { margin: 0; padding: 0; list-style: none; display: grid; gap: .7rem; }
.hk-legend li { display: grid; grid-template-columns: 1.7rem 1fr; gap: .7rem; align-items: start; }
.hk-legend li > b {
    display: grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: var(--hk-pink);
    color: #fff;
    font-size: .8rem;
}
.hk-legend strong { color: var(--hk-navy); }

/* ---------- keys table ---------- */
.hk-table { width: 100%; margin: 1rem 0 0; border-collapse: collapse; }
.hk-table th, .hk-table td { padding: .65rem .9rem; border-bottom: 1px solid var(--hk-line); text-align: start; vertical-align: top; }
.hk-table th { width: 30%; white-space: nowrap; }
.hk-table tr:nth-child(odd) td, .hk-table tr:nth-child(odd) th { background: #faf9fc; }

/* ---------- troubleshooting ---------- */
.hk-faq { display: grid; gap: .75rem; margin: 1rem 0 0; }
.hk-faq details { border: 1px solid var(--hk-line); border-radius: 12px; background: #fff; }
.hk-faq summary { padding: .8rem 1rem; font-weight: 700; color: var(--hk-navy); cursor: pointer; }
.hk-faq details[open] summary { border-bottom: 1px solid var(--hk-line); }
.hk-faq details p { margin: 0; padding: .8rem 1rem; }

.hk-credit { margin: 1.5rem 0 0;margin-bottom: 65px;text-align: center; color: var(--hk-muted); font-size: .9rem; }
.hk-footer-actions { display: flex; justify-content: center; margin: 2.5rem 0 1rem; }

/* print-only blocks are hidden on screen */
.hk-print-only { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
    .hk-quick-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hk-map-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .hk-quick-list { grid-template-columns: 1fr; }
    .hk-lang { width: 100%; flex-wrap: wrap; }
    .hk-lang select { flex: 1; min-width: 0; }
    .hk-table th { white-space: normal; width: 36%; }
}

/* =========================================================
   PRINT
   ========================================================= */
@page { size: A4 portrait; margin: 14mm 13mm 16mm; }

@media print {
    html, body { background: #fff !important; }

    /* site chrome */
    #header, #footer, .page-header, .custom-circle, .custom-page-header-curved-top-1,
    .hk-toolbar, .hk-toc, .hk-footer-actions, .hk-no-print,
    .cookie-banner, #cookieBanner, [id*="cookie" i] { display: none !important; }

    .main, .section, .container, .body { margin: 0 !important; padding: 0 !important; max-width: none !important; width: 100% !important; background: #fff !important; }

    .hk-page { font-size: 10pt; line-height: 1.45; color: #111; }
    .hk-print-only { display: block; }

    .hk-print-head {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12mm;
        margin: 0 0 6mm;
        padding-bottom: 4mm;
        border-bottom: .6mm solid var(--hk-pink);
    }
    .hk-print-head img { width: 15mm; height: auto; }
    .hk-print-brand { display: flex; align-items: center; gap: 3mm; font-size: 8pt; line-height: 1.25; color: var(--hk-navy); }
    .hk-print-brand strong { display: block; font-size: 9.5pt; }
    .hk-print-title { margin: 0; text-align: end; font-size: 15pt; font-weight: 800; color: var(--hk-navy); }

    .hk-intro { margin: 0 0 5mm; font-size: 10.5pt; max-width: none; }

    .hk-quick { margin: 0 0 6mm; padding: 4mm; border-radius: 3mm; background: #f4f1f8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; }
    .hk-quick-list { grid-template-columns: repeat(5, 1fr); gap: 2mm; }
    .hk-quick-list li { padding: 9mm 2mm 2mm; font-size: 8pt; box-shadow: none; border: .25mm solid #d8d4e2; border-radius: 2mm; }
    .hk-quick-list li::before { top: 2mm; inset-inline-start: 2mm; width: 5.5mm; height: 5.5mm; font-size: 8pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    .hk-section { margin: 0 0 6mm; }
    #hk-area { break-before: page; }
    #hk-keys { break-inside: avoid; }
    .hk-lead { break-after: avoid; }
    .hk-section > h2 { font-size: 13pt; break-after: avoid; }
    .hk-num { -webkit-print-color-adjust: exact; print-color-adjust: exact; width: 6.5mm; height: 6.5mm; font-size: 9pt; }
    .hk-lead { margin: 2mm 0; }
    .hk-steps { margin: 2mm 0; }
    .hk-steps li { margin-bottom: 1.6mm; break-inside: avoid; }
    .hk-note { margin-top: 3mm; padding: 2.5mm 3.5mm; break-inside: avoid; background: #fbf7fa !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    .hk-map-wrap { grid-template-columns: 1fr 1fr; gap: 6mm; break-inside: avoid; }
    .hk-map { box-shadow: none; font-size: 6.4pt; padding: 2.5mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .hk-pin, .hk-legend li > b, .hk-m-head, .hk-m-nav .nx, .hk-m-modules i.on, .hk-m-progress i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .hk-legend { gap: 2mm; font-size: 9pt; }

    .hk-table { break-inside: avoid; font-size: 9.5pt; }
    .hk-table th, .hk-table td { padding: 1.6mm 2.5mm; }
    .hk-table tr:nth-child(odd) td, .hk-table tr:nth-child(odd) th { background: #f7f5fa !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    /* FAQ: all answers open and visible on paper */
    .hk-faq { gap: 1.5mm; margin-top: 2mm; }
    .hk-faq details { break-inside: avoid; }
    .hk-faq summary { padding: 1.5mm 3mm; }
    .hk-faq details > p { padding: 1.5mm 3mm; }
    .hk-faq details[open] summary { border-bottom: 0; }
    .hk-faq details::details-content { content-visibility: visible; display: block; }
    .hk-faq details > p { display: block; }
    .hk-faq summary { list-style: none; }
    .hk-faq summary::-webkit-details-marker { display: none; }

    .hk-ui, kbd { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    .hk-print-funding {
        display: block !important;
        margin-top: 8mm;
        padding-top: 4mm;
        border-top: .3mm solid #bbb;
        font-size: 7.5pt;
        line-height: 1.35;
        color: #333;
        break-inside: avoid;
    }
    .hk-print-funding .row1 { display: flex; align-items: center; gap: 5mm; margin-bottom: 3mm; }
    .hk-print-funding img.eu { width: 20mm; height: auto; flex: none; }
    .hk-print-funding p { margin: 0 0 1.5mm; }
    .hk-print-funding .cc { display: flex; flex-direction: column; align-items: flex-start; gap: 2mm; }
    .hk-credit { margin: 6mm 0 0; font-size: 8.5pt; color: #333; }
    .hk-print-funding img.cc-logo { width: 18mm; height: auto; }
    .hk-print-url { word-break: break-all; }
}
