/**
 * Design transfer: threat library detail pages (APT, ransomware, malware, technique,
 * vulnerability, incident, country). Matches design-v2 "Library Entry".
 * Every rule is scoped to .dc-kh (set by inc/dc-kh-threat.php); ?bd_dc=old removes it.
 */

.dc-kh {
    --dc-ink: #11193f;
    --dc-body: #4b5563;
    --dc-muted: #6b7591;
    --dc-line: #e3e7ef;
    --dc-hair: #eceff3;
    --dc-coral: #ff5247;
    --dc-adv: #d63a30;
    --dc-night: #000313;
    --dc-panel: #f6f8f9;
    --dc-ease: cubic-bezier(.16, 1, .3, 1);
    font-family: Urbanist, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dc-ink);
}

/* ------------------------------------------------------------------ hero */
.dc-kh .hp-kb-hero {
    padding-block: clamp(40px, 4.4vw, 64px) clamp(43px, 5.63vw, 72px);
    background:
        radial-gradient(45% 55% at 80% 0%, rgb(255 82 70 / .24) 0%, rgb(3 8 36 / 0) 100%),
        url('../../img/uc/bg-digital-red.jpg') right bottom / 110% auto no-repeat,
        var(--dc-night);
    isolation: isolate;
}

.dc-kh .hp-kb-hero__grid {
    grid-template-columns: minmax(0, 7fr) minmax(300px, 4fr);
    gap: 40px clamp(29px, 5vw, 64px);
    align-items: start;
}

.dc-kh .hp-kb-hero--solo .hp-kb-hero__grid {
    grid-template-columns: minmax(0, 1fr);
}

.dc-kh .hp-kb-hero__copy {
    gap: 18px;
}

.dc-kh .hp-kb-crumbs {
    gap: 10px;
    font-family: Urbanist, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
    color: #8b97c4;
}

.dc-kh .hp-kb-crumbs a {
    color: #a6b0d2;
    text-decoration: none;
}

.dc-kh .hp-kb-crumbs a:hover {
    color: #fff;
}

.dc-kh .hp-kb-crumbs [aria-current] {
    color: #fff;
}

.dc-kh .hp-kb-hero .hp-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-family: var(--bd-font-mono, 'JetBrains Mono', monospace);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #a6b0d2;
}

.dc-kh .hp-kb-hero .hp-eyebrow::before {
    content: '';
    flex: none;
    width: 8px;
    height: 8px;
    background: var(--dc-coral);
}

.dc-kh .hp-kb-hero__title {
    margin: 0;
    font-size: clamp(31px, 4.69vw, 60px);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.03em;
    color: #fff;
    text-wrap: balance;
}

.dc-kh .hp-kb-hero__title::after {
    content: '.';
}

.dc-kh .hp-kb-hero__aka {
    margin-top: 0;
    max-width: 36em;
    font-family: Urbanist, 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    color: #a6b0d2;
}

.dc-kh .hp-kb-hero .hp-lead {
    max-width: 36em;
    margin: 0;
    font-size: 17px;
    line-height: 1.55;
    color: #a6b0d2;
}

.dc-kh .hp-kb-hero__badges {
    margin-top: 0;
    gap: 8px;
    list-style: none;
    padding: 0;
}

.dc-kh .hp-kb-hero__badges > li > span,
.dc-kh .hp-kb-hero__badges > li > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: rgb(255 255 255 / .07);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .08);
    font-family: Urbanist, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #fff;
    text-decoration: none;
}

.dc-kh .hp-kb-hero__badges > li > a:hover {
    background: rgb(255 255 255 / .14);
}

.dc-kh .hp-kb-hero__badges .hp-kb-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8b97c4;
}

.dc-kh .hp-kb-hero__badges .hp-kb-status.is-active::before,
.dc-kh .hp-kb-hero__badges .hp-kb-status.is-critical::before,
.dc-kh .hp-kb-hero__badges .hp-kb-status.is-high::before {
    background: var(--dc-coral);
}

/* Facts card: glass panel, label column plus value */
.dc-kh .hp-kb-idcard {
    padding: 8px 24px;
    border: 0;
    border-radius: 14px;
    background: rgb(255 255 255 / .07);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .08);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.dc-kh .hp-kb-idcard__mark {
    display: none;
}

.dc-kh .hp-kb-libcard.has-flag .hp-kb-idcard__mark {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 16px;
    padding: 0 0 16px;
    border: 0;
    border-bottom: 1px solid rgb(255 255 255 / .1);
    background: none;
    min-height: 0;
    overflow: visible;
}

.dc-kh .hp-kb-libcard.has-flag .hp-kb-flagbg,
.dc-kh .hp-kb-libcard.has-flag .hp-kb-idcard__code {
    display: none;
}

.dc-kh .hp-kb-libcard.has-flag .hp-kb-flag--hero {
    width: 64px;
    height: 48px;
    border-radius: 6px;
    border: 1px solid rgb(255 255 255 / .22);
    box-shadow: 0 8px 22px rgb(0 3 19 / .4);
}

.dc-kh .hp-kb-idcard__facts > div {
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid rgb(255 255 255 / .1);
}

.dc-kh .hp-kb-idcard__facts > div:first-child {
    border-top: 0;
}

.dc-kh .hp-kb-idcard__facts dt {
    font-family: var(--bd-font-mono, 'JetBrains Mono', monospace);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1.7;
    color: #8b97c4;
}

.dc-kh .hp-kb-idcard__facts dd {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    color: #fff;
}

/* Tiles variant (ransomware, vulnerability) reads as the same list */
.dc-kh .hp-kb-libcard--tiles .hp-kb-idcard__facts {
    display: block;
}

.dc-kh .hp-kb-libcard--tiles .hp-kb-idcard__facts > div,
.dc-kh .hp-kb-libcard--tiles .hp-kb-idcard__facts > div.is-wide {
    display: grid;
    grid-column: auto;
    border-radius: 0;
    background: none;
}

/* Spec strip (vulnerabilities): five cells, first one filled navy */
.dc-kh .hp-kb-spec {
    padding: 24px 0 0;
    background: #fff;
}

.dc-kh .hp-kb-spec__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin: 0;
}

.dc-kh .hp-kb-spec__cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--dc-line);
}

.dc-kh .hp-kb-spec__cell:first-child {
    background: var(--dc-ink);
    box-shadow: none;
}

.dc-kh .hp-kb-spec__cell dt {
    font-family: var(--bd-font-mono, 'JetBrains Mono', monospace);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dc-muted);
}

.dc-kh .hp-kb-spec__cell dd {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--dc-ink);
}

.dc-kh .hp-kb-spec__cell:first-child dt {
    color: #8b97c4;
}

.dc-kh .hp-kb-spec__cell:first-child dd {
    color: #fff;
}

/* ------------------------------------------------------------------ body */
.dc-kh .hp-kb-body {
    padding-block: clamp(43px, 5.63vw, 72px) 0;
    background: #fff;
}

.dc-kh .hp-kb-body .hp-container {
    max-width: 1184px;
}

.dc-kh .hp-kb-body__grid {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: clamp(29px, 5vw, 64px);
}

.dc-kh .hp-kb-body__grid--libsolo {
    grid-template-columns: 200px minmax(0, 1fr);
}

.dc-kh .hp-kb-toc {
    top: calc(var(--bd4-top, 0px) + 104px);
}

.dc-kh .hp-kb-toc__title {
    margin-bottom: 10px;
    font-family: Urbanist, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: capitalize;
    color: var(--dc-muted);
}

.dc-kh .hp-kb-toc ol {
    gap: 2px;
    border-left: 0;
}

.dc-kh .hp-kb-toc a {
    display: block;
    margin-left: 0;
    padding: 7px 0 7px 14px;
    border-left: 2px solid var(--dc-line);
    font-size: 13.5px;
    line-height: 1.35;
    text-transform: capitalize;
    color: var(--dc-muted);
}

.dc-kh .hp-kb-toc a:hover {
    color: var(--dc-ink);
}

.dc-kh .hp-kb-toc a.is-current {
    border-left-color: var(--dc-coral);
    font-weight: 600;
    color: var(--dc-ink);
}

.dc-kh .hp-kb-content {
    gap: 56px;
    max-width: 760px;
    font-size: 17px;
    line-height: 1.7;
    color: #2b3350;
}

/* In Short */
.dc-kh .hp-kb-definition {
    padding: 24px 28px;
    border: 0;
    border-radius: 12px;
    background: var(--dc-panel);
    box-shadow: inset 0 0 0 1px var(--dc-line);
}

.dc-kh .hp-kb-definition__label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-family: var(--bd-font-mono, 'JetBrains Mono', monospace);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dc-ink);
}

.dc-kh .hp-kb-definition__label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--dc-coral);
}

.dc-kh .hp-kb-definition__text {
    margin: 10px 0 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--dc-ink);
}

/* Section headings: Title Case, period */
.dc-kh .hp-kb-block {
    gap: 14px;
    scroll-margin-top: 120px;
}

.dc-kh .hp-kb-block__title {
    margin: 0;
    font-size: clamp(28px, 2.8vw, 36px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-transform: capitalize;
    color: var(--dc-ink);
}

.dc-kh .hp-kb-block__title::after {
    content: '.';
}

.dc-kh #kb-sources > .hp-kb-block__title,
.dc-kh #kb-research > .hp-kb-block__title,
.dc-kh #sources > .hp-kb-block__title,
.dc-kh #research > .hp-kb-block__title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.dc-kh #kb-sources > .hp-kb-block__title::after,
.dc-kh #kb-research > .hp-kb-block__title::after,
.dc-kh #sources > .hp-kb-block__title::after,
.dc-kh #research > .hp-kb-block__title::after {
    content: none;
}

.dc-kh .hp-kb-block__lead {
    margin-top: 0;
    font-size: 17px;
    color: var(--dc-body);
}

.dc-kh .hp-kb-prose {
    gap: 14px;
    max-width: none;
    font-size: 17px;
    line-height: 1.7;
    color: #2b3350;
}

.dc-kh .hp-kb-prose p:first-child {
    font-size: 17px;
    line-height: 1.7;
    color: #2b3350;
}

.dc-kh .hp-kb-prose h3 {
    margin-top: 10px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--dc-ink);
}

.dc-kh .hp-kb-note {
    padding: 20px 24px;
    border-left: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--dc-line);
    font-size: 15.5px;
    color: var(--dc-body);
}

.dc-kh .hp-kb-note__label {
    font-size: 12px;
    color: var(--dc-ink);
}

/* Key-value, tables: rounded hairline frame */
.dc-kh .kb-apt-minute,
.dc-kh .kb-apt-table--names,
.dc-kh .kb-apt-related {
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--dc-line);
    overflow: hidden;
}

.dc-kh .kb-apt-minute {
    padding: 4px 22px;
}

.dc-kh .kb-apt-minute__row {
    grid-template-columns: minmax(120px, .4fr) 1fr;
    gap: 20px;
    padding-block: 14px;
}

.dc-kh .kb-apt-minute__row + .kb-apt-minute__row {
    border-top-color: var(--dc-hair);
}

.dc-kh .kb-apt-minute dt,
.dc-kh .kb-apt-table thead th {
    font-family: var(--bd-font-mono, 'JetBrains Mono', monospace);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--dc-muted);
}

.dc-kh .kb-apt-minute dd {
    font-size: 15px;
    color: var(--dc-body);
}

.dc-kh .kb-apt-table {
    font-size: 15px;
    color: var(--dc-body);
}

.dc-kh .kb-apt-table th,
.dc-kh .kb-apt-table td {
    padding: 14px 20px;
    border-bottom-color: var(--dc-hair);
}

.dc-kh .kb-apt-table thead th {
    border-bottom-color: var(--dc-line);
    background: var(--dc-panel);
}

.dc-kh .kb-apt-table tbody th,
.dc-kh .kb-apt-rows__name {
    font-weight: 600;
    color: var(--dc-ink);
}

.dc-kh .kb-apt-table--actions {
    border: 0;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px var(--dc-line);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.dc-kh .kb-apt-table--actions tr:last-child th,
.dc-kh .kb-apt-table--actions tr:last-child td {
    border-bottom: 0;
}

/* Attribution list */
.dc-kh .kb-apt-attrib li {
    padding: 14px 0 14px 20px;
    border-left: 2px solid var(--dc-line);
    font-size: 15px;
    color: var(--dc-body);
}

.dc-kh .kb-apt-attrib__who {
    color: var(--dc-ink);
}

/* Rows (tools, related) */
.dc-kh .kb-apt-rows li,
.dc-kh .kb-apt-related li {
    padding-block: 14px;
    border-top-color: var(--dc-hair);
    font-size: 15px;
}

.dc-kh .kb-apt-related {
    padding: 4px 22px;
}

.dc-kh .kb-apt-rows__name a {
    text-decoration-color: #c9d0de;
}

/* Targets */
.dc-kh .kb-apt-targets__col.hp-card,
.dc-kh .hp-kb-targets__col {
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px var(--dc-line);
    border: 0;
    background: #fff;
}

.dc-kh .hp-kb-targets__label {
    font-size: 12px;
    color: var(--dc-muted);
}

.dc-kh .hp-kb-targets__list li {
    background: var(--dc-panel);
    box-shadow: inset 0 0 0 1px var(--dc-line);
    font-size: 14.5px;
}

/* Timeline: coral dot with soft halo, hairline rows */
.dc-kh .hp-kb-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dc-kh .hp-kb-timeline__item {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px 44px;
    padding: 14px 0;
    border-top: 1px solid var(--dc-hair);
}

.dc-kh .hp-kb-timeline__item::before {
    top: 21px;
    left: 136px;
    width: 10px;
    height: 10px;
    border: 0;
    background: var(--dc-coral);
    box-shadow: 0 0 0 4px rgb(255 82 71 / .15);
}

.dc-kh .hp-kb-timeline__item:not(:last-child)::after {
    content: none;
}

.dc-kh .hp-kb-timeline__year {
    font-family: Urbanist, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0;
    text-align: left;
    color: var(--dc-ink);
}

.dc-kh .hp-kb-timeline__year .bd-num,
.dc-kh .hp-kb-timeline__year * {
    font-size: inherit;
}

.dc-kh .hp-kb-timeline__body {
    gap: 2px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--dc-body);
}

.dc-kh .hp-kb-timeline__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dc-ink);
}

/* Dark tactic panel keeps navy but matches the new corner and light */
.dc-kh .kb-apt-chain,
.dc-kh .hp-kb-chain {
    border-radius: 14px;
    background:
        radial-gradient(60% 40% at 50% 0%, rgb(255 82 70 / .2), rgb(3 9 37 / 0) 70%),
        var(--dc-night);
}

.dc-kh .kb-apt-chain__tactic,
.dc-kh .hp-kb-chain__tactic {
    font-size: 12px;
    font-weight: 600;
    color: #ff7a71;
}

/* Defence cards: navy check square instead of the green shield */
.dc-kh .hp-kb-defenses {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 12px;
}

.dc-kh .hp-kb-defense {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
    border: 0;
    border-radius: 10px;
    background: var(--dc-panel);
    box-shadow: inset 0 0 0 1px var(--dc-line);
    font-size: 14px;
    line-height: 1.5;
    color: var(--dc-body);
}

.dc-kh .hp-kb-defense svg {
    display: none;
}

.dc-kh .hp-kb-defense::before {
    content: '';
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--dc-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}

.dc-kh .hp-kb-defense > div,
.dc-kh .hp-kb-defense > span {
    grid-column: 2;
}

.dc-kh .hp-kb-defense__title {
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--dc-ink);
}

/* Cards */
.dc-kh .hp-kb-body .hp-kb-card,
.dc-kh .hp-kb-body .hp-kb-tool,
.dc-kh .hp-kb-body .hp-kb-alias {
    border: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--dc-line);
}

.dc-kh .hp-kb-body .hp-kb-card:hover {
    box-shadow: inset 0 0 0 1px var(--dc-ink);
}

.dc-kh .hp-kb-body .hp-kb-card__name,
.dc-kh .hp-kb-body .hp-kb-tool__name,
.dc-kh .hp-kb-body .hp-kb-alias__name {
    font-size: 16.5px;
    font-weight: 600;
    color: var(--dc-ink);
}

.dc-kh .hp-kb-tool__type {
    color: var(--dc-adv);
}

/* Library link lists, threat lists */
.dc-kh .hp-kb-liblinks__item,
.dc-kh .hp-kb-threats__item,
.dc-kh .hp-kb-regs__row {
    border-color: var(--dc-line);
}

.dc-kh .hp-kb-liblinks__kind {
    color: var(--dc-adv);
}

/* FAQ: hairline list, coral plus */
.dc-kh .hp-kb-faq__list {
    border-bottom: 1px solid #dfe4ea;
}

.dc-kh .hp-kb-faq__item {
    border-top: 1px solid #dfe4ea;
}

.dc-kh .hp-kb-faq__q {
    font-size: 16.5px;
    font-weight: 600;
    color: var(--dc-ink);
}

.dc-kh .hp-kb-faq__a {
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--dc-body);
}

/* Sources and research: numbered hairline list */
.dc-kh .hp-kb-sources li {
    grid-template-columns: 28px minmax(0, 1fr);
    padding-block: 11px;
    border-top-color: var(--dc-hair);
    font-size: 14.5px;
}

.dc-kh .hp-kb-sources li::before {
    font-family: Urbanist, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
    color: #7a8299;
}

.dc-kh .hp-kb-sources a {
    color: var(--dc-ink);
    text-decoration: underline;
    text-decoration-color: #c9d0de;
    text-underline-offset: 4px;
}

.dc-kh .hp-kb-sources a:hover {
    color: var(--dc-coral);
}

.dc-kh .hp-kb-sources__by {
    font-size: 12.5px;
    color: var(--dc-muted);
}

/* Brandefense bridge and platform panel: dark card, coral glow, coral pill */
.dc-kh .hp-kb-bridge,
.dc-kh .kb-apt-platform {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background:
        radial-gradient(60% 90% at 50% 0%, rgb(255 82 70 / .24), rgb(3 9 37 / 0) 70%),
        var(--dc-night);
    color: #a6b0d2;
}

.dc-kh .hp-kb-bridge__kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    color: #8b97c4;
}

.dc-kh .hp-kb-bridge__title {
    color: #fff;
}

.dc-kh .hp-kb-bridge__text {
    color: #a6b0d2;
}

.dc-kh .hp-kb-bridge .hp-btn,
.dc-kh .hp-kb-bridge a.hp-btn {
    border-radius: 8px;
    background: var(--dc-coral);
    color: #fff;
}

.dc-kh .kb-apt-platform__list li {
    border-top-color: rgb(255 255 255 / .1);
}

/* Prev / next */
.dc-kh .hp-kb-pager {
    gap: 12px;
}

.dc-kh .hp-kb-pager__link {
    padding: 18px 20px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--dc-line);
}

.dc-kh .hp-kb-pager__link:hover {
    box-shadow: inset 0 0 0 1px var(--dc-ink);
}

.dc-kh .hp-kb-pager__kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--dc-muted);
}

.dc-kh .hp-kb-pager__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dc-ink);
}

.dc-kh .hp-kb-byline {
    margin: -36px 0 0;
}

.dc-kh .hp-kb-byline__reviewed {
    font-size: 13px;
    color: var(--dc-muted);
}

/* Shelf grid ("Browse the threat library") and Keep Exploring */
.dc-kh .hp-kb-shelves,
.dc-kh .hp-kb-related,
.dc-kh .hp-kb-explore {
    background: var(--dc-panel);
}

.dc-kh .hp-kb-shelves .hp-h2,
.dc-kh .hp-kb-explore .hp-h2,
.dc-kh .hp-kb-explore h2 {
    font-size: clamp(28px, 3.13vw, 40px);
    font-weight: 500;
    letter-spacing: -0.025em;
    text-transform: capitalize;
}

.dc-kh .hp-kb-shelves .hp-h2::after,
.dc-kh .hp-kb-explore h2::after {
    content: '.';
}

.dc-kh .hp-kb-shelf {
    border-radius: 12px;
}

/* Mobile */
@media (max-width: 859px) {
    .dc-kh .hp-kb-body__grid,
    .dc-kh .hp-kb-body__grid--libsolo {
        grid-template-columns: minmax(0, 1fr);
    }

    .dc-kh .hp-kb-toc {
        position: static;
    }

    .dc-kh .hp-kb-toc ol {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
    }

    .dc-kh .hp-kb-toc ol::-webkit-scrollbar {
        display: none;
    }

    .dc-kh .hp-kb-toc li {
        flex: none;
    }

    .dc-kh .hp-kb-toc a {
        white-space: nowrap;
        padding: 8px 14px;
        border: 1px solid var(--dc-line);
        border-radius: 8px;
    }

    .dc-kh .hp-kb-toc a.is-current {
        border-color: var(--dc-coral);
    }

    .dc-kh .hp-kb-hero__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dc-kh .hp-kb-timeline__item {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        padding-left: 22px;
    }

    .dc-kh .hp-kb-timeline__item::before {
        left: 0;
    }

    .dc-kh .hp-kb-idcard__facts > div {
        grid-template-columns: 100px minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .dc-kh .hp-kb-hero {
        padding-block: 108px 43px;
    }

    .dc-kh .hp-kb-content {
        gap: 48px;
    }

    .dc-kh .hp-kb-definition {
        padding: 20px;
    }

    .dc-kh .hp-kb-idcard {
        padding: 6px 18px;
    }
}
@media (min-width: 860px) { .dc-kh .hp-kb-toc a { border-radius: 0; } }

/* Government actions: date, body, then what; let long dates wrap */
.dc-kh .kb-apt-table--actions tbody th {
    width: 168px;
    white-space: normal;
}

.dc-kh .kb-apt-table--actions td:nth-child(2) {
    width: 22%;
}

.dc-kh .kb-apt-platform .hp-kb-block__title {
    color: #fff;
}

/* Section heads further down the page (Other Groups, Browse The Library) */
.dc-kh .hp-kb-sectionhead .hp-h2 {
    font-size: clamp(28px, 3.13vw, 40px);
    font-weight: 500;
    letter-spacing: -0.025em;
    text-transform: capitalize;
}

.dc-kh .hp-kb-sectionhead .hp-h2::after {
    content: '.';
}

/* Inline blocks inside prose (facts table, timeline) and takeaways */
.dc-kh .bdb,
.dc-kh .hp-kb-takeaways {
    border: 0;
    border-radius: 10px;
    background: var(--dc-panel);
    box-shadow: inset 0 0 0 1px var(--dc-line);
}

.dc-kh .bdb::before,
.dc-kh .bdb::after,
.dc-kh .hp-kb-takeaways::before {
    content: none;
}

.dc-kh .bdb .bdb__title,
.dc-kh .hp-kb-takeaways__title {
    font-family: var(--bd-font-mono, 'JetBrains Mono', monospace);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dc-ink);
}

.dc-kh .hp-kb-prose h3 {
    text-transform: none;
}

.dc-kh .hp-kb-body {
    padding-bottom: clamp(48px, 6vw, 80px);
}

.dc-kh .hp-kb-shelves {
    padding-block: clamp(56px, 7vw, 88px);
}

.dc-kh .hp-kb-hero__title {
    font-family: Urbanist, 'Helvetica Neue', Arial, sans-serif;
    text-transform: capitalize;
}

.dc-kh .hp-kb-hero__title::after {
    text-transform: none;
}

.dc-kh .hp-kb-crumbs [aria-current] {
    text-transform: capitalize;
}

.dc-kh .hp-kb-defense,
.dc-kh .hp-kb-defense * {
    overflow-wrap: anywhere;
    min-width: 0;
}

.dc-kh .hp-kb-defenses > .hp-kb-defense,
.dc-kh .hp-kb-defenses > .hp-kb-defense:first-child:nth-last-child(4),
.dc-kh .hp-kb-defenses > .hp-kb-defense:first-child:nth-last-child(4) ~ .hp-kb-defense {
    flex: 1 1 max(280px, calc((100% - 12px) / 2));
}

/* Dated timeline (incidents): same plain row as the other timelines */
.dc-kh .hp-kb-timeline--dates {
    padding: 0;
}

.dc-kh .hp-kb-timeline--dates .hp-kb-timeline__item {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px 44px;
    padding: 14px 0;
}

.dc-kh .hp-kb-timeline--dates .hp-kb-timeline__item::before {
    top: 21px;
    left: 136px;
    width: 10px;
    height: 10px;
    border: 0;
    background: var(--dc-coral);
    box-shadow: 0 0 0 4px rgb(255 82 71 / .15);
}

.dc-kh .hp-kb-timeline--dates .hp-kb-timeline__item:not(:last-child)::after {
    content: none;
}

.dc-kh .hp-kb-timeline--dates .hp-kb-timeline__year {
    align-self: start;
    justify-self: start;
    padding: 0;
    border: 0;
    background: none;
    font-family: Urbanist, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--dc-ink);
}

.dc-kh .hp-kb-timeline--dates .hp-kb-timeline__body p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--dc-body);
}

@media (max-width: 859px) {
    .dc-kh .hp-kb-timeline--dates .hp-kb-timeline__item {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        padding-left: 22px;
    }

    .dc-kh .hp-kb-timeline--dates .hp-kb-timeline__item::before {
        left: 0;
    }
}

/* Hero mark on APT and ransomware pages: the origin flag where the page names a country, else the neutral emblem */
.dc-kh--apt .hp-kb-idcard__mark,
.dc-kh--ransomware .hp-kb-idcard__mark {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 18px 0 16px;
    border: 0;
    border-bottom: 1px solid rgb(255 255 255 / .1);
    background: none;
    min-height: 0;
    overflow: visible;
}

.dc-kh--apt .hp-kb-idcard__mark .hp-kb-emblem,
.dc-kh--ransomware .hp-kb-idcard__mark .hp-kb-emblem {
    width: 64px;
    height: 64px;
    color: #fff;
}

.dc-kh--apt .hp-kb-idcard__mark .hp-kb-flag--origin {
    width: 64px;
    height: 48px;
    border-radius: 6px;
    border: 1px solid rgb(255 255 255 / .22);
    box-shadow: 0 8px 22px rgb(0 3 19 / .4);
}

.dc-kh--apt .hp-kb-idcard__code,
.dc-kh--ransomware .hp-kb-idcard__code {
    position: static;
    margin-left: auto;
    max-width: none;
    text-align: right;
}

/* ------------------------------------------------------------------ parity round (design-v4) */
.dc-kh-progress { position: fixed; left: 0; top: 0; z-index: 100000; width: 100%; height: 3px; background: #ff5247; transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

/* FAQ: question turns coral on hover, plus turns into a cross, answer opens smoothly */
:root { interpolate-size: allow-keywords; }
.dc-kh .hp-kb-faq__item::details-content { block-size: 0; overflow: hidden; transition: block-size .4s var(--dc-ease), content-visibility .4s allow-discrete; }
.dc-kh .hp-kb-faq__item[open]::details-content { block-size: auto; }
.dc-kh .hp-kb-faq__q { transition: color .2s; }
.dc-kh .hp-kb-faq__q:hover { color: var(--dc-coral); }
@media (prefers-reduced-motion: reduce) {
    .dc-kh .hp-kb-faq__item::details-content { transition: none; }
}

/* "At a glance" points inside the In Short box (moved there by kh-threat.js) */
.dc-kh .hp-kb-definition .dc-glance { list-style: none; margin: 14px 0 0; padding: 0; }
.dc-kh .hp-kb-definition .dc-glance li { position: relative; margin: 0; padding: 8px 0 8px 28px; border-top: 1px solid var(--dc-line); font-size: 15px; line-height: 1.5; color: var(--dc-body); }
.dc-kh .hp-kb-definition .dc-glance li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 6px; height: 6px; background: var(--dc-coral); }
.dc-kh .hp-kb-crumbs a, .dc-kh .hp-kb-crumbs span[aria-current] { text-transform: capitalize; }

/* lists inside body text: one hairline card, like the design's key-value tables */
.dc-kh .hp-kb-prose ul { list-style: none; margin: 8px 0 14px; padding: 0; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--dc-line); }
.dc-kh .hp-kb-prose ul > li { margin: 0; padding: 14px 20px; border-top: 1px solid var(--dc-hair); font-size: 15px; line-height: 1.5; }
.dc-kh .hp-kb-prose ul > li:first-child { border-top: 0; }
.dc-kh .hp-kb-prose ul ul { margin: 8px 0 0; box-shadow: none; border-radius: 0; }

/* ------------------------------------------------------------------ readability round (11 Oct)
   Bigger small text, contrast 4.5+, visible card edges, tinted fact boxes, calmer section rhythm. */
.dc-kh {
    --dc-edge: rgb(0 3 19 / .14);
    --dc-edge-soft: rgb(0 3 19 / .08);
    --dc-lift: 0 1px 2px rgb(0 3 19 / .05), 0 8px 22px rgb(0 3 19 / .05);
    --dc-card: var(--dc-panel);
}

/* secondary text: 15px+, ink body colour instead of the 3.8 grey */
.dc-kh .hp-kb-liblinks__text,
.dc-kh .kb-apt-src__claim,
.dc-kh .hp-kb-card__summary,
.dc-kh .hp-kb-timeline--dates .hp-kb-timeline__year,
.dc-kh .blog-detail-content.blog-detail-content .bdb-flow__text,
.dc-kh .hp-kb-shelf__text { font-size: 15.5px; line-height: 1.6; }
.dc-kh .hp-kb-liblinks__facts,
.dc-kh .kb-apt-rows__tag,
.dc-kh .hp-kb-shelf__count,
.dc-kh .kb-mw-ids { font-size: 15px; line-height: 1.55; color: var(--dc-body); }
.dc-kh .kb-cite, .dc-kh .kb-apt-attrib__who, .dc-kh .kb-apt-tech span { color: var(--dc-body); }
.dc-kh .kb-apt-attrib__who { font-size: 14px; }
.dc-kh .hp-kb-liblinks__kind,
.dc-kh .hp-kb-pager__kicker,
.dc-kh .hp-kb-sources__by,
.dc-kh .hp-kb-card__aka,
.dc-kh .hp-kb-chain__id,
.dc-kh .bdb-flow__id,
.dc-kh .bdb-flow__kind,
.dc-kh .bdb-tl__date { font-size: 14px; }
.dc-kh .hp-kb-sources__by,
.dc-kh .hp-kb-pager__kicker { color: var(--dc-body); }
.dc-kh .hp-kb-card__cta { font-size: 15px; }
.dc-kh .hp-kb-toc a { font-size: 15px; line-height: 1.35; color: var(--dc-body); }
.dc-kh .hp-kb-toc a[aria-current], .dc-kh .hp-kb-toc a.is-active, .dc-kh .hp-kb-toc li.is-active > a { color: var(--dc-ink); }
.dc-kh .hp-kb-content p, .dc-kh .hp-kb-content li { line-height: 1.65; }

/* card edges: visible hairline plus a soft lift, clear hover */
.dc-kh .hp-kb-body .hp-kb-card,
.dc-kh .hp-kb-body .hp-kb-tool,
.dc-kh .hp-kb-body .hp-kb-alias,
.dc-kh .hp-kb-threats__item,
.dc-kh .hp-kb-liblinks__item,
.dc-kh .hp-kb-regs__row,
.dc-kh .hp-kb-pager__link {
    border-color: var(--dc-edge);
    box-shadow: var(--dc-lift);
    transition: border-color .2s, box-shadow .2s, transform .2s var(--dc-ease);
}
.dc-kh .hp-kb-body .hp-kb-card,
.dc-kh .hp-kb-body .hp-kb-tool,
.dc-kh .hp-kb-body .hp-kb-alias { box-shadow: inset 0 0 0 1px var(--dc-edge), var(--dc-lift); }
.dc-kh .hp-kb-body .hp-kb-card:hover,
.dc-kh .hp-kb-threats__item:hover,
.dc-kh .hp-kb-pager__link:hover { border-color: var(--dc-ink); box-shadow: inset 0 0 0 1px var(--dc-ink), 0 10px 26px rgb(0 3 19 / .10); transform: translateY(-2px); }
.dc-kh .hp-kb-threats__item { background: #fff; }

/* In Short box: soft coral tint with a coral edge, clearly different from the grey bands */
.dc-kh .hp-kb-definition {
    background: linear-gradient(180deg, rgb(255 82 71 / .07), rgb(255 82 71 / .03));
    box-shadow: inset 0 0 0 1px rgb(255 82 71 / .28), inset 4px 0 0 var(--dc-coral);
}
.dc-kh .hp-kb-definition__text { font-size: 18px; line-height: 1.65; }

/* fact boxes: tinted, with a real edge */
.dc-kh .kb-apt-minute,
.dc-kh .kb-apt-table--names,
.dc-kh .kb-apt-related,
.dc-kh .hp-kb-note {
    background: var(--dc-card);
    box-shadow: inset 0 0 0 1px var(--dc-edge);
}
.dc-kh .hp-kb-prose ul { box-shadow: inset 0 0 0 1px var(--dc-edge); }

/* section rhythm: hairline break before each section, every second section on a soft full-width band */
.dc-kh .hp-kb-body { overflow-x: clip; }
.dc-kh .hp-kb-content > section.hp-kb-block { position: relative; isolation: isolate; }
.dc-kh .hp-kb-content > section.hp-kb-block + section.hp-kb-block::after {
    content: ""; position: absolute; left: 0; right: 0; top: -28px; height: 1px; background: var(--dc-edge-soft); z-index: -1;
}
.dc-kh .hp-kb-content > section.hp-kb-block:nth-of-type(even):not(.kb-apt-platform):not(.hp-kb-faq):not(.hp-kb-liblinks) {
    --dc-card: #fff;
    padding-block: 44px;
}
.dc-kh .hp-kb-content > section.hp-kb-block:nth-of-type(even):not(.kb-apt-platform):not(.hp-kb-faq):not(.hp-kb-liblinks)::before {
    content: ""; position: absolute; z-index: -1; inset: 0;
    background: var(--dc-panel);
    box-shadow: 0 0 0 100vmax var(--dc-panel);
    clip-path: inset(0 -100vmax);
}
.dc-kh .hp-kb-content > section.hp-kb-block:nth-of-type(even):not(.kb-apt-platform):not(.hp-kb-faq):not(.hp-kb-liblinks)::after { display: none; }
@media (max-width: 900px) {
    .dc-kh .hp-kb-content > section.hp-kb-block:nth-of-type(even):not(.kb-apt-platform):not(.hp-kb-faq):not(.hp-kb-liblinks) { padding-block: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    .dc-kh .hp-kb-threats__item, .dc-kh .hp-kb-pager__link, .dc-kh .hp-kb-body .hp-kb-card { transition: none; transform: none !important; }
}

.dc-kh .hp-kb-body .hp-kb-byline, .dc-kh .hp-kb-body .hp-kb-hubdate { font-size: 14px; color: var(--dc-body); }
.dc-kh .hp-kb-body .hp-kb-byline * , .dc-kh .hp-kb-body .hp-kb-hubdate * { color: inherit; }

/* owner G2 width */
.dc-kh .hp-kb-body .hp-container { max-width: calc(var(--bd-wrap-max, 1280px) + 2 * 32px); }
.dc-kh .hp-kb-content { max-width: none; }
.dc-kh .hp-kb-prose > p, .dc-kh .hp-kb-prose > ol, .dc-kh .hp-kb-prose > h3, .dc-kh .hp-kb-prose > h4 { max-width: 760px; }
