/* =========================================================
   DEALOPP — WHITEPAPER STYLES
   Scoped under .whitepaper-page & .full-paper-reader
========================================================= */

.whitepaper-page,
.full-paper-reader {
    --navy: #071D59;
    --cyan: #13C7E5;
    --cyan-dark: #08AFCB;
    --black: #202124;
    --text: #586783;
    --muted: #8792A6;
    --line: #DFE8ED;
    --line-soft: #EDF2F5;
    --white: #fff;
    --soft: #F8FBFC;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--black);
}

.whitepaper-page *,
.full-paper-reader * {
    box-sizing: border-box;
}

.whitepaper-page a,
.full-paper-reader a {
    text-decoration: none;
}

.whitepaper-page {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 100px;
    background: radial-gradient(ellipse at 88% 5%, rgba(19,199,229,.065) 0%, rgba(19,199,229,.025) 27%, rgba(19,199,229,0) 55%), #fff;
}

.whitepaper-page:before {
    content: "";
    position: absolute;
    top: 80px;
    right: -260px;
    width: 900px;
    height: 380px;
    border-radius: 50%;
    border-bottom: 1px solid rgba(19,199,229,.08);
    transform: rotate(-9deg);
    pointer-events: none;
}

.whitepaper-page .container {
    position: relative;
    z-index: 2;
    width: calc(100% - 80px);
    max-width: 1180px;
    margin: 0 auto;
    padding: 0;
}

.whitepaper-page .hero {
    padding: 105px 0 74px;
    background: transparent;
}

.whitepaper-page .document-reference {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-bottom: 31px;
    color: var(--cyan-dark);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.whitepaper-page .document-reference:after {
    content: "";
    width: 62px;
    height: 1px;
    background: var(--cyan);
}

.whitepaper-page .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
    gap: 90px;
    align-items: end;
}

.whitepaper-page .hero-title {
    max-width: 780px;
    margin-bottom: 28px;
    color: var(--black);
    font-size: clamp(52px, 6vw, 82px);
    line-height: .96;
    letter-spacing: -4px;
    font-weight: 650;
}

.whitepaper-page .hero-title span {
    color: var(--cyan);
}

.whitepaper-page .paper-name {
    margin-bottom: 14px;
    color: var(--navy);
    font-size: 16px;
    font-weight: 700;
}

.whitepaper-page .hero-description {
    max-width: 680px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.7;
}

.whitepaper-page .document-card {
    padding-left: 30px;
    border-left: 1px solid var(--line);
}

.whitepaper-page .doc-number {
    margin-bottom: 36px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.whitepaper-page .doc-meta-row {
    padding: 13px 0;
    border-top: 1px solid var(--line-soft);
}

.whitepaper-page .doc-meta-row:last-child {
    border-bottom: 1px solid var(--line-soft);
}

.whitepaper-page .doc-label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.whitepaper-page .doc-value {
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
}

.whitepaper-page .hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 35px;
}

.whitepaper-page .button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 23px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 650;
    transition: .2s ease;
    cursor: pointer;
}

.whitepaper-page .button-primary {
    background: var(--navy);
    border: 1px solid var(--navy);
    color: #fff !important;
}

.whitepaper-page .button-primary:hover {
    background: #0B2B74;
    transform: translateY(-1px);
    color: #fff !important;
}

.whitepaper-page .button-secondary {
    background: #fff;
    border: 1px solid #CFDDE5;
    color: var(--navy) !important;
}

.whitepaper-page .button-secondary:hover {
    border-color: var(--cyan);
    color: var(--cyan-dark) !important;
}

.whitepaper-page .document-strip {
    display: grid;
    grid-template-columns: .65fr 1.45fr .65fr 1fr;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.whitepaper-page .strip-item {
    padding: 19px 22px;
    border-right: 1px solid var(--line);
}

.whitepaper-page .strip-item:first-child {
    padding-left: 0;
}

.whitepaper-page .strip-item:last-child {
    border-right: 0;
}

.whitepaper-page .strip-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.25px;
    text-transform: uppercase;
}

.whitepaper-page .strip-value {
    color: var(--navy);
    font-size: 12px;
    font-weight: 650;
}

.whitepaper-page .section {
    padding: 100px 0;
}

.whitepaper-page .section + .section {
    border-top: 1px solid var(--line-soft);
}

.whitepaper-page .section-head {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 35px;
    margin-bottom: 60px;
}

.whitepaper-page .section-number {
    padding-top: 8px;
    color: var(--cyan-dark);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1.4px;
}

.whitepaper-page .section-heading {
    max-width: 710px;
}

.whitepaper-page .section-kicker {
    margin-bottom: 12px;
    color: var(--cyan-dark);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.whitepaper-page .section-title {
    margin-bottom: 17px;
    color: var(--black);
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.04;
    letter-spacing: -2px;
    font-weight: 650;
}

.whitepaper-page .section-description {
    max-width: 650px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.65;
}

.whitepaper-page .architecture-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
}

.whitepaper-page .architecture-item {
    min-height: 180px;
    padding: 28px 34px 30px 0;
    border-bottom: 1px solid var(--line);
}

.whitepaper-page .architecture-item:not(:nth-child(3n)) {
    border-right: 1px solid var(--line);
    padding-right: 34px;
}

.whitepaper-page .architecture-item:nth-child(3n+2),
.whitepaper-page .architecture-item:nth-child(3n+3) {
    padding-left: 34px;
}

.whitepaper-page .arch-number {
    margin-bottom: 29px;
    color: var(--cyan);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.3px;
}

.whitepaper-page .arch-title {
    margin-bottom: 10px;
    color: var(--navy);
    font-size: 16px;
    font-weight: 700;
}

.whitepaper-page .arch-text {
    max-width: 290px;
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.55;
}

.whitepaper-page .principles-section {
    padding: 110px 0;
    background: linear-gradient(180deg, rgba(247,251,252,.55), rgba(255,255,255,0));
}

.whitepaper-page .principles-intro {
    max-width: 700px;
    margin-bottom: 58px;
}

.whitepaper-page .principles-title {
    margin-bottom: 19px;
    color: var(--black);
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1;
    letter-spacing: -2.7px;
    font-weight: 650;
}

.whitepaper-page .principles-title span {
    color: var(--cyan);
}

.whitepaper-page .principles-description {
    max-width: 610px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.65;
}

.whitepaper-page .principle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.whitepaper-page .principle {
    padding: 35px 38px;
    border-right: 1px solid var(--line);
}

.whitepaper-page .principle:first-child {
    padding-left: 0;
}

.whitepaper-page .principle:last-child {
    border-right: 0;
}

.whitepaper-page .principle-number {
    margin-bottom: 32px;
    color: var(--cyan);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.3px;
}

.whitepaper-page .principle h3 {
    margin-bottom: 12px;
    color: var(--navy);
    font-size: 17px;
}

.whitepaper-page .principle p {
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.6;
}

.whitepaper-page .contents-layout {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 100px;
}

.whitepaper-page .contents-intro {
    max-width: 390px;
}

.whitepaper-page .contents-title {
    margin-bottom: 18px;
    color: var(--black);
    font-size: 42px;
    line-height: 1.05;
    letter-spacing: -1.8px;
    font-weight: 650;
}

.whitepaper-page .contents-intro p {
    color: var(--text);
    font-size: 14px;
    line-height: 1.65;
}

.whitepaper-page .contents-list {
    border-top: 1px solid var(--line);
}

.whitepaper-page .contents-row {
    display: grid;
    grid-template-columns: 55px 1fr;
    align-items: center;
    min-height: 54px;
    border-bottom: 1px solid var(--line);
}

.whitepaper-page .contents-number {
    color: var(--cyan-dark);
    font-size: 10px;
    font-weight: 750;
}

.whitepaper-page .contents-name {
    color: var(--navy);
    font-size: 13.5px;
    font-weight: 600;
}

.whitepaper-page .diagram-section {
    background: linear-gradient(180deg, rgba(248,251,252,.65), #fff);
}

.whitepaper-page .diagram {
    max-width: 820px;
    margin: 20px auto 0;
    padding: 55px 65px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.8);
}

.whitepaper-page .diagram-node {
    max-width: 290px;
    margin: 0 auto;
    padding: 18px 20px;
    border: 1px solid #D7E5EB;
    background: #fff;
    text-align: center;
}

.whitepaper-page .diagram-label {
    display: block;
    margin-bottom: 5px;
    color: var(--cyan-dark);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.whitepaper-page .diagram-name {
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
}

.whitepaper-page .connector {
    width: 1px;
    height: 36px;
    margin: auto;
    background: var(--cyan);
}

.whitepaper-page .connector-small {
    width: 1px;
    height: 28px;
    margin: auto;
    background: rgba(19,199,229,.7);
}

.whitepaper-page .diagram-split {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 110px;
    max-width: 630px;
    margin: auto;
}

.whitepaper-page .diagram-split:before {
    content: "";
    position: absolute;
    top: -14px;
    left: 25%;
    right: 25%;
    height: 1px;
    background: rgba(19,199,229,.7);
}

.whitepaper-page .diagram-split .diagram-node {
    width: 100%;
}

.whitepaper-page .diagram-footnote {
    margin-top: 30px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
    text-align: center;
}

.whitepaper-page .token-layout {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 90px;
    align-items: center;
}

.whitepaper-page .token-copy h2 {
    margin-bottom: 19px;
    font-size: clamp(38px, 4vw, 52px);
    line-height: 1.04;
    letter-spacing: -2px;
    font-weight: 650;
}

.whitepaper-page .token-copy h2 span {
    color: var(--cyan);
}

.whitepaper-page .token-copy p {
    max-width: 490px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
}

.whitepaper-page .formula-panel {
    padding: 38px 42px;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(248,252,253,.95), #fff);
}

.whitepaper-page .formula-label {
    margin-bottom: 23px;
    color: var(--cyan-dark);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.whitepaper-page .formula {
    padding-bottom: 27px;
    border-bottom: 1px solid var(--line);
    color: var(--navy);
    font-family: "Courier New", monospace;
    font-size: clamp(18px, 2vw, 25px);
}

.whitepaper-page .formula-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 28px;
    padding-top: 27px;
}

.whitepaper-page .legend-item {
    display: flex;
    gap: 11px;
    color: var(--text);
    font-size: 12px;
}

.whitepaper-page .legend-symbol {
    min-width: 14px;
    color: var(--cyan-dark);
    font-family: "Courier New", monospace;
    font-weight: 700;
}

.whitepaper-page .paper-cta {
    padding: 105px 0 110px;
    border-top: 1px solid var(--line-soft);
}

.whitepaper-page .cta-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 70px;
    align-items: end;
}

.whitepaper-page .cta-label {
    margin-bottom: 17px;
    color: var(--cyan-dark);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.whitepaper-page .cta-title {
    max-width: 620px;
    margin-bottom: 16px;
    font-size: clamp(38px, 4vw, 54px);
    line-height: 1.02;
    letter-spacing: -2px;
    font-weight: 650;
}

.whitepaper-page .cta-text {
    max-width: 600px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.65;
}

.whitepaper-page .cta-actions {
    display: flex;
    gap: 10px;
}

/* ===== FULL WHITEPAPER READER ===== */
.full-paper-reader {
    display: none;
    border-top: 1px solid #DFE8ED;
    background: #fff;
}

.full-paper-reader.open {
    display: block;
}

.full-paper-reader .paper {
    padding: 30px 0 110px;
}

.full-paper-reader .w {
    width: calc(100% - 80px);
    max-width: 1180px;
    margin: auto;
}

.full-paper-reader .paperhead {
    padding: 75px 0 55px;
    border-bottom: 1px solid #DFE8ED;
}

.full-paper-reader .paperhead h2 {
    font-size: 44px;
    letter-spacing: -2px;
    margin: 12px 0 16px;
}

.full-paper-reader .paperhead p {
    color: #586783;
    line-height: 1.65;
}

.full-paper-reader .k {
    font-size: 10px;
    letter-spacing: 1.6px;
    font-weight: 750;
    color: #08AFCB;
    text-transform: uppercase;
}

.full-paper-reader .ch {
    display: grid;
    grid-template-columns: 145px minmax(0, 790px);
    gap: 35px;
    padding: 86px 0;
    border-bottom: 1px solid #EDF2F5;
    scroll-margin-top: 25px;
}

.full-paper-reader .no {
    color: #08AFCB;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 1.4px;
}

.full-paper-reader .ch h2 {
    font-size: clamp(31px, 3.5vw, 45px);
    letter-spacing: -1.7px;
    line-height: 1.08;
    margin: 12px 0 31px;
}

.full-paper-reader .ch h3 {
    font-size: 20px;
    color: #071D59;
    margin: 43px 0 15px;
}

.full-paper-reader .ch p,
.full-paper-reader .ch li {
    color: #586783;
    font-size: 15px;
    line-height: 1.8;
}

.full-paper-reader .ch p {
    margin: 0 0 19px;
}

.full-paper-reader .ch li {
    margin: 8px 0;
}

.full-paper-reader .ch b {
    color: #071D59;
}

.full-paper-reader .note {
    margin: 32px 0;
    padding: 24px 26px;
    border-left: 2px solid #13C7E5;
    background: #F9FCFD;
    color: #586783;
    line-height: 1.7;
}

.full-paper-reader .formula {
    margin: 23px 0;
    padding: 27px 30px;
    border: 1px solid #DFE8ED;
    background: linear-gradient(135deg, #F8FCFD, #fff);
    font-family: "Courier New", monospace;
    color: #071D59;
    font-size: 18px;
    line-height: 1.6;
    overflow: auto;
}

.full-paper-reader .process {
    border-top: 1px solid #DFE8ED;
    margin: 30px 0;
}

.full-paper-reader .process div {
    display: grid;
    grid-template-columns: 45px 190px 1fr;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid #DFE8ED;
}

.full-paper-reader .process span {
    color: #08AFCB;
    font-size: 10px;
    font-weight: 750;
}

.full-paper-reader .process p {
    font-size: 13.5px;
    margin: 0;
    line-height: 1.6;
}

.reader-close-wrap {
    width: calc(100% - 80px);
    max-width: 1180px;
    margin: 0 auto;
    padding-top: 42px;
    text-align: right;
}

.reader-close {
    border: 1px solid #CFDDE5;
    background: #fff;
    color: #071D59;
    border-radius: 24px;
    padding: 12px 20px;
    font: 600 13px Inter, "Helvetica Neue", Arial, sans-serif;
    cursor: pointer;
}

.reader-close:hover {
    border-color: #13C7E5;
    color: #08AFCB;
}

@media (max-width: 950px) {
    .whitepaper-page .container {
        width: calc(100% - 60px);
    }
    .whitepaper-page .hero-grid,
    .whitepaper-page .contents-layout,
    .whitepaper-page .token-layout,
    .whitepaper-page .cta-inner {
        grid-template-columns: 1fr;
        gap: 55px;
    }
    .whitepaper-page .architecture-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .whitepaper-page .principle-grid {
        grid-template-columns: 1fr;
    }
    .whitepaper-page .principle,
    .whitepaper-page .principle:first-child {
        padding: 28px 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 800px) {
    .full-paper-reader .w,
    .reader-close-wrap {
        width: calc(100% - 40px);
    }
    .full-paper-reader .ch {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 65px 0;
    }
    .full-paper-reader .process div {
        grid-template-columns: 35px 1fr;
    }
    .full-paper-reader .process p {
        grid-column: 2;
    }
}

@media (max-width: 650px) {
    .whitepaper-page .container {
        width: calc(100% - 40px);
    }
    .whitepaper-page .hero {
        padding: 70px 0 55px;
    }
    .whitepaper-page .hero-title {
        font-size: 48px;
        letter-spacing: -2.5px;
    }
    .whitepaper-page .document-strip {
        grid-template-columns: 1fr 1fr;
    }
    .whitepaper-page .section {
        padding: 75px 0;
    }
    .whitepaper-page .section-head {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .whitepaper-page .architecture-grid {
        grid-template-columns: 1fr;
    }
    .whitepaper-page .architecture-item,
    .whitepaper-page .architecture-item:not(:nth-child(3n)),
    .whitepaper-page .architecture-item:nth-child(3n+2),
    .whitepaper-page .architecture-item:nth-child(3n+3) {
        min-height: auto;
        padding: 25px 0;
        border-right: 0;
    }
    .whitepaper-page .diagram {
        padding: 40px 20px;
    }
    .whitepaper-page .diagram-split {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .whitepaper-page .diagram-split:before {
        display: none;
    }
    .whitepaper-page .formula-panel {
        padding: 30px 23px;
    }
    .whitepaper-page .formula-legend {
        grid-template-columns: 1fr;
    }
    .whitepaper-page .hero-actions,
    .whitepaper-page .cta-actions {
        flex-direction: column;
    }
    .whitepaper-page .button {
        width: 100%;
    }
}
