/* Copyright (c) 2026 DNA Genics, S.L. All rights reserved. */
.cpo-profiles,
.cpo-history-methods {
    --evidence-line: var(--hd-gold, #a58346);
    --evidence-muted: var(--hd-muted, #565c54);
    --evidence-serif: var(--hd-serif, "Cormorant Garamond", Georgia, serif);
    color: var(--hd-primary, #203a30);
    font-family: var(--hd-sans, Inter, sans-serif);
    margin-block: clamp(3rem, 6vw, 6rem);
}

.cpo-profiles .cpo-evidence-heading h2,
.cpo-history-methods .cpo-evidence-heading h2 {
    color: inherit;
    font-family: var(--evidence-serif);
    font-size: clamp(2.75rem, 5vw, 5.25rem);
    font-weight: 500;
    letter-spacing: -.035em;
    line-height: 1.04;
    margin: 0;
}

.cpo-evidence-heading p {
    color: var(--evidence-muted);
    font-size: clamp(1rem, 1.4vw, 1.3rem);
    line-height: 1.5;
    margin: .7rem 0 0;
}

.cpo-profiles .cpo-evidence-heading {
    border-block-end: 1px solid var(--evidence-line);
    padding-block-end: clamp(1.1rem, 2.3vw, 2.1rem);
}

.cpo-profile-grid {
    display: grid;
    gap: 0 clamp(1.5rem, 3vw, 2.75rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cpo-profile {
    align-items: center;
    border-block-end: 1px solid var(--evidence-line);
    display: flex;
    gap: clamp(.85rem, 1.35vw, 1.35rem);
    min-width: 0;
    padding-block: clamp(1.15rem, 2.25vw, 2.05rem);
    scroll-margin-block-start: var(--cpo-anchor-offset, 8rem);
}

.cpo-profile-image {
    aspect-ratio: 1.54;
    display: block;
    flex: 0 0 44%;
    height: auto;
    max-width: 44%;
    object-fit: cover;
    width: 44%;
}

.cpo-profile-copy { flex: 1; min-width: 0; }
.cpo-profile-heading { align-items: baseline; display: flex; flex-wrap: wrap; gap: .2rem .65rem; justify-content: space-between; }
.cpo-profile-heading h3,
.cpo-profile-value {
    color: inherit;
    font-family: var(--evidence-serif);
    font-size: clamp(1.55rem, 2.3vw, 2.6rem);
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.08;
    margin: 0;
    overflow-wrap: anywhere;
}
.cpo-profile-value { font-size: clamp(1.35rem, 2vw, 2.15rem); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.cpo-profile-copy p { color: var(--hd-ink, #26352e); font-size: clamp(.95rem, 1.23vw, 1.13rem); line-height: 1.45; margin: .8rem 0; }
.cpo-profile-copy button,
.cpo-method-overview > summary {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 500;
    gap: .45em;
    min-height: 44px;
    padding: .4rem 0;
    text-align: start;
    text-decoration: underline;
    text-underline-offset: .25em;
}
.cpo-profile-copy button:hover,
.cpo-method-overview > summary:hover { text-decoration-thickness: 2px; }
.cpo-profile-copy button:focus-visible,
.cpo-history-methods summary:focus-visible { border-radius: .15rem; outline: 3px solid currentColor; outline-offset: 3px; }
.cpo-profile-open { overflow: hidden; }
dialog.cpo-profile-drawer {
    --sheet-inset: clamp(1.25rem, 3vw, 2.4rem);
    --sheet-rule: #c8b898;
    --sheet-paper: var(--hd-paper, #faf8f4);
    background: var(--sheet-paper);
    border: 1px solid var(--sheet-rule);
    border-radius: .5rem;
    box-sizing: border-box;
    color: var(--hd-primary, #213a2f);
    font-family: var(--hd-sans, Inter, sans-serif);
    height: calc(100% - 1.5rem);
    height: calc(100dvh - 1.5rem);
    inset-block: .75rem;
    inset-inline: auto .75rem;
    margin: 0;
    max-height: none;
    max-width: calc(100% - 1.5rem);
    overflow: hidden;
    padding: 0;
    position: fixed;
    text-align: start;
    width: 43rem;
}
.cpo-profile-drawer:not([open]) { display: none; }
.cpo-profile-drawer[open] { display: flex; flex-direction: column; }
.cpo-profile-drawer::backdrop { background: rgb(18 33 26 / 60%); }
.cpo-sheet-header {
    align-items: center;
    background: var(--hd-primary, #213a2f);
    border-block-end: 2px solid var(--hd-gold, #a58346);
    color: #faf8f4;
    display: flex;
    flex: none;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.25rem var(--sheet-inset);
}
.cpo-sheet-header h2, .cpo-sheet-history h3, .cpo-sheet-fold > summary, .cpo-sheet-timeline h4 {
    color: inherit;
    font-family: var(--hd-serif, "Cormorant Garamond", Georgia, serif);
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.1;
    margin: 0;
}
.cpo-sheet-header h2 { font-size: clamp(2rem, 4vw, 3.1rem); overflow-wrap: anywhere; }
.cpo-sheet-label, .cpo-sheet-facts dt, .cpo-sheet-date {
    display: block;
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .06em;
    line-height: 1.5;
    margin: 0 0 .3rem;
}
.cpo-sheet-label { color: #e7d9bd; }
.cpo-sheet-close {
    align-items: center;
    background: transparent;
    border: 1px solid #aab2a4;
    border-radius: 50%;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    flex: none;
    font-size: 1rem;
    height: 44px;
    justify-content: center;
    padding: 0;
    width: 44px;
}
.cpo-sheet-close:hover { background: #365145; }
.cpo-sheet-close .dna-icon { font-size: 1.35rem; }
.cpo-profile-drawer :is(button, a, summary):focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.cpo-sheet-body {
    color: var(--hd-ink, #26352e);
    font-size: 1rem;
    line-height: 1.65;
    min-height: 0;
    overflow: auto;
    overflow-wrap: anywhere;
    overscroll-behavior: contain;
    padding: var(--sheet-inset);
    scrollbar-gutter: stable;
}
.cpo-sheet-body:focus-visible { outline: 2px solid var(--hd-primary, #213a2f); outline-offset: -4px; }
.cpo-sheet-lead {
    align-items: stretch;
    background: #eeeee3;
    display: flex;
    gap: clamp(.8rem, 2vw, 1.4rem);
}
.cpo-sheet-art { display: flex; flex: 0 0 51%; flex-direction: column; margin: 0; }
.cpo-sheet-art img { aspect-ratio: 8 / 5; display: block; flex: 1 0 auto; height: auto; min-height: 0; object-fit: cover; width: 100%; }
.cpo-sheet-art figcaption { font-size: .8rem; padding: .25rem .65rem; }
.cpo-sheet-facts { align-self: center; min-width: 0; padding: .75rem 0; padding-inline-end: .75rem; }
.cpo-sheet-facts:only-child { padding-inline: 1rem; }
.cpo-sheet-facts dl, .cpo-sheet-facts dd { margin: 0; }
.cpo-sheet-facts dd { font-size: .95rem; line-height: 1.4; }
.cpo-sheet-facts dt { color: #4c5b4c; letter-spacing: .018em; }
.cpo-sheet-facts dt:not(:first-child) { margin-block-start: .9rem; }
.cpo-sheet-facts .cpo-sheet-estimate {
    color: var(--hd-primary, #213a2f);
    font-family: var(--hd-serif, "Cormorant Garamond", Georgia, serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-variant-numeric: lining-nums tabular-nums;
    line-height: 1;
}
.cpo-sheet-history { padding-block-start: 1.6rem; }
.cpo-sheet-history h3, .cpo-sheet-fold > summary { font-size: clamp(1.55rem, 2.3vw, 2rem); }
.cpo-sheet-body p { margin: .7rem 0 1rem; }
.cpo-sheet-fold { border-block-start: 1px solid var(--sheet-rule); }
.cpo-sheet-fold:first-of-type { margin-block-start: 1.55rem; }
.cpo-sheet-fold:last-child { border-block-end: 1px solid var(--sheet-rule); }
.cpo-sheet-fold > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    list-style: none;
    min-height: 54px;
    padding-block: .8rem;
}
.cpo-sheet-fold > summary::-webkit-details-marker { display: none; }
.cpo-sheet-fold > summary span { flex: none; font-size: .85rem; }
.cpo-sheet-fold[open] > summary span { transform: rotate(180deg); }
.cpo-sheet-note, .cpo-sheet-event-meta, .cpo-sheet-event-location { color: #505d51; font-size: .9rem; }
.cpo-sheet-timeline { list-style: none; margin: 1rem 0; padding: 0; }
.cpo-sheet-timeline li { border-inline-start: 1px solid var(--sheet-rule); padding: .15rem 0 1.35rem; padding-inline-start: 1.1rem; position: relative; }
.cpo-sheet-timeline li::before {
    background: var(--hd-gold, #a58346);
    border-radius: 50%;
    content: "";
    height: 7px;
    inset-block-start: .45rem;
    inset-inline-start: -4px;
    position: absolute;
    width: 7px;
}
.cpo-sheet-timeline h4 { font-size: 1.5rem; }
.cpo-sheet-timeline p { margin: .45rem 0; }
.cpo-sheet-date { color: #685331; }
@media (max-width: 600px) {
    dialog.cpo-profile-drawer {
        --sheet-inset: clamp(.9rem, 4vw, 1.45rem);
        border: 0;
        border-radius: 0;
        height: 100%;
        height: 100dvh;
        inset: 0;
        max-width: none;
        width: 100%;
    }
    .cpo-sheet-header { padding-block-start: max(1rem, env(safe-area-inset-top)); padding-block-end: 1rem; }
    .cpo-sheet-body { padding-block-end: max(1.5rem, env(safe-area-inset-bottom)); scrollbar-gutter: auto; }
    .cpo-sheet-art { flex-basis: 47%; }
    .cpo-sheet-facts dt:not(:first-child) { margin-block-start: .5rem; }
}
[dir="rtl"] .cpo-profile-copy button span,
[dir="rtl"] .cpo-method-overview > summary span { transform: scaleX(-1); }

.cpo-history-methods {
    display: grid;
    gap: clamp(1.5rem, 3vw, 3rem);
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
}
.cpo-history, .cpo-methods { min-width: 0; scroll-margin-block-start: var(--cpo-anchor-offset, 8rem); }
.cpo-methods { border-inline-start: 1px solid var(--evidence-line); padding-inline-start: clamp(1.5rem, 2.5vw, 2.75rem); }
.cpo-history-methods .cpo-evidence-heading h2 { font-size: clamp(2.35rem, 3.8vw, 4rem); }
.cpo-history .cpo-evidence-heading p { font-family: var(--evidence-serif); font-size: clamp(1.2rem, 1.75vw, 1.6rem); }
.cpo-evidence-timeline { list-style: none; margin: clamp(1.5rem, 3vw, 3rem) 0 0; padding: 0; }
.cpo-evidence-timeline li {
    display: grid;
    gap: .35rem clamp(1rem, 2vw, 2rem);
    grid-template-columns: minmax(6.5rem, .48fr) minmax(0, 1fr);
    padding-block-end: clamp(1.7rem, 3.1vw, 3.1rem);
    padding-inline-start: clamp(1.65rem, 3.15vw, 3rem);
    position: relative;
}
.cpo-evidence-timeline li:last-child { padding-block-end: .3rem; }
.cpo-evidence-timeline li::before {
    background: var(--evidence-line);
    border-radius: 50%;
    content: "";
    height: .65rem;
    inset-block-start: .48em;
    inset-inline-start: .13rem;
    position: absolute;
    width: .65rem;
}
.cpo-evidence-timeline li:not(:last-child)::after {
    background: var(--evidence-line);
    content: "";
    inset-block: .6em -.6em;
    inset-inline-start: .42rem;
    position: absolute;
    width: 1px;
}
.cpo-event-date { color: var(--hd-ink, #26352e); font-size: clamp(1rem, 1.5vw, 1.3rem); font-weight: 600; }
.cpo-evidence-timeline h3 {
    color: inherit;
    font-family: var(--evidence-serif);
    font-size: clamp(1.5rem, 2vw, 2.05rem);
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.14;
    margin: 0;
}
.cpo-evidence-timeline p { color: var(--evidence-muted); margin: .35rem 0 0; }
.cpo-methods .cpo-evidence-heading { margin-block-end: clamp(1.3rem, 2.5vw, 2.5rem); }
.cpo-method-question {
    border: 1px solid #c6b9a2;
    border-radius: .4rem;
    margin-block-end: .7rem;
    padding-inline: clamp(.95rem, 1.5vw, 1.5rem);
}
.cpo-method-question[open] { background: #e9ece2; border-color: transparent; }
.cpo-method-question > summary {
    align-items: center;
    color: inherit;
    cursor: pointer;
    display: flex;
    font-family: var(--evidence-serif);
    font-size: clamp(1.35rem, 1.9vw, 1.9rem);
    font-weight: 600;
    gap: .8rem;
    justify-content: space-between;
    line-height: 1.15;
    min-height: 48px;
    padding-block: .85rem;
}
.cpo-history-methods summary { list-style: none; }
.cpo-history-methods summary::-webkit-details-marker { display: none; }
.cpo-method-question > summary::after {
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    content: "";
    display: block;
    flex: none;
    height: .42em;
    margin-inline-end: .12em;
    transform: rotate(45deg);
    width: .42em;
}
.cpo-method-question[open] > summary::after { transform: rotate(225deg); }
.cpo-method-question > p { border-block-start: 1px solid #bdc3b3; color: var(--hd-ink, #26352e); line-height: 1.55; margin: 0; padding-block: .9rem 1.1rem; }
.cpo-method-overview { margin-block-start: .6rem; }
.cpo-method-overview dl { margin-top: .75rem; }
.cpo-method-overview dt { margin-block: 1.2rem .25rem; }
.cpo-method-overview dd { color: var(--evidence-muted); line-height: 1.5; margin-inline: 0; }
.cpo-evidence-empty { color: var(--evidence-muted); margin-block: 1.5rem; }

.cpo-demo-assistant-label { color: var(--hd-ink); font-size: .9rem; margin: 0 0 .6rem; }
.cpo-demo-questions { display: grid; gap: .6rem; margin-block-end: 1.15rem; }
.cpo-demo-question { border: 1px solid #92856b; border-radius: 7px; }
.cpo-demo-question > summary {
    align-items: center;
    color: var(--hd-ink);
    cursor: pointer;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    list-style: none;
    min-height: 46px;
    padding: .7rem 1rem;
}
.cpo-demo-question > summary::-webkit-details-marker { display: none; }
.cpo-demo-question > summary:hover, .cpo-demo-question[open] { background: #fff7; }
.cpo-demo-question > summary:focus-visible { outline: 3px solid var(--hd-forest); outline-offset: 2px; }
.cpo-demo-question > summary .dna-icon { flex: none; }
[dir="rtl"] .cpo-demo-question > summary .dna-icon { transform: scaleX(-1); }
.cpo-demo-question[open] > summary .dna-icon { transform: rotate(90deg); }
.cpo-demo-question > p { border-block-start: 1px solid #c1c8b9; color: var(--hd-ink); line-height: 1.55; margin: 0 1rem; padding-block: .8rem 1rem; }
.contemporary-assistant a.contemporary-generate { box-sizing: border-box; }

@media (max-width: 800px) {
    .cpo-profile-grid, .cpo-history-methods { grid-template-columns: minmax(0, 1fr); }
    .cpo-profile-image { flex-basis: 36%; max-width: 36%; width: 36%; }
    .cpo-history-methods { gap: 2rem; }
    .cpo-methods { border-block-start: 1px solid var(--evidence-line); border-inline-start: 0; padding-block-start: 2rem; padding-inline-start: 0; }
}
@media (max-width: 480px) {
    .cpo-profile-grid { gap: 0; }
    .cpo-profile-image { flex-basis: 33%; max-width: 33%; width: 33%; }
    .cpo-profile-heading { align-items: start; gap: .2rem .5rem; }
    .cpo-profile-copy p { margin: .4rem 0 0; }
    .cpo-evidence-timeline li { grid-template-columns: minmax(0, 1fr); }
}
@media print {
    .cpo-history-methods { display: block; }
    .cpo-methods { border: 0; padding: 0; }
    .cpo-profile, .cpo-evidence-timeline li, .cpo-method-question { break-inside: avoid; }
    .cpo-profile-copy button, .cpo-profile-drawer { display: none !important; }
}
