/* InvestHub V7.1.6 — Opportunity Detail Experience
 * Scoped to .ih-deal-page so legacy public/detail primitives stay isolated.
 */

.ih-deal-page {
    --deal-dark: #031f2a;
    --deal-dark-2: #04383a;
    --deal-teal: #00a9a5;
    --deal-teal-bright: #13c5bf;
    --deal-purple: #72469a;
    --deal-blue: #003d62;
    --deal-surface: #f4f7f8;
    --deal-line: #d9e4e7;
    --deal-card: #ffffff;
    overflow: clip;
    background: var(--deal-surface);
}

.ih-deal-page :is(a, button) {
    -webkit-tap-highlight-color: transparent;
}

/* Hero */
.ih-deal-hero {
    position: relative;
    padding: clamp(1.25rem, 2.2vw, 2.1rem) 0 0;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 12% 18%, rgba(124, 63, 152, .28), transparent 28%),
        radial-gradient(circle at 84% 12%, rgba(0, 183, 178, .22), transparent 30%),
        linear-gradient(125deg, #001d2d 0%, #003f42 56%, #004d49 100%);
}

.ih-deal-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .22;
    background-image:
        linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

.ih-deal-hero > .container {
    position: relative;
    z-index: 1;
}

.ih-deal-toolbar {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(1.25rem, 2vw, 1.9rem);
}

.ih-deal-toolbar form { margin: 0; }

.ih-deal-back,
.ih-deal-save {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .58rem .85rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(2, 22, 28, .22);
    color: rgba(255,255,255,.88);
    font-size: .74rem;
    font-weight: 760;
    backdrop-filter: blur(12px);
    transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

.ih-deal-save { cursor: pointer; }
.ih-deal-back:hover,
.ih-deal-save:hover {
    border-color: rgba(255,255,255,.34);
    background: rgba(255,255,255,.1);
    color: #fff;
    transform: translateY(-1px);
}
[dir="rtl"] .ih-deal-back i { transform: rotate(180deg); }

.ih-deal-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(520px, 1.18fr);
    gap: clamp(2rem, 4vw, 5rem);
    align-items: center;
}

.ih-deal-hero__copy {
    min-width: 0;
    padding-block: 1rem 2.2rem;
}

.ih-deal-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .48rem;
    margin-bottom: 1rem;
}

.ih-deal-kicker span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .3rem .62rem;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: #cde3e3;
    font-size: .66rem;
    font-weight: 730;
}

.ih-deal-hero h1 {
    max-width: 13ch;
    color: #fff;
    font-size: clamp(2.45rem, 4.6vw, 5rem);
    font-weight: 720;
    line-height: .98;
}

html[lang="ar"] .ih-deal-hero h1 {
    max-width: 14ch;
    line-height: 1.15;
}

.ih-deal-hero__summary {
    max-width: 760px;
    margin: 1.15rem 0 0;
    color: #b9d0d1;
    font-size: clamp(.92rem, 1.25vw, 1.05rem);
    line-height: 1.8;
}

.ih-deal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.2rem;
}

.ih-deal-badge {
    min-height: 31px;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .32rem .66rem;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.075);
    color: #ecf7f7;
    font-size: .66rem;
    font-weight: 760;
}

.ih-deal-badge.is-reviewed { color: #8ff1cf; }
.ih-deal-badge.is-match { color: #e5c8f6; }

.ih-deal-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .85rem;
    margin-top: 1.45rem;
}

.ih-deal-hero__actions .btn-primary {
    --bs-btn-bg: var(--deal-teal);
    --bs-btn-border-color: var(--deal-teal);
    --bs-btn-hover-bg: #0abcb7;
    --bs-btn-hover-border-color: #0abcb7;
    border-radius: 999px;
}

.ih-deal-link {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #d9eeee;
    font-size: .76rem;
    font-weight: 760;
}

.ih-deal-link:hover { color: #fff; }

/* Hero visual */
.ih-deal-visual {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 178px;
    height: clamp(360px, 34vw, 470px);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 32px 32px 0 0;
    overflow: hidden;
    background: rgba(0, 20, 26, .35);
    box-shadow: 0 32px 80px rgba(0, 12, 17, .25);
    transform: translateZ(0);
}

.ih-deal-visual__main {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: #073b43;
}

.ih-deal-visual__main > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform .8s var(--ih7-ease);
}

@media (hover: hover) and (pointer: fine) {
    .ih-deal-visual:hover .ih-deal-visual__main > img { transform: scale(1.035); }
}

.ih-deal-visual__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,25,30,.68), transparent 55%);
}

.ih-deal-visual__caption {
    position: absolute;
    inset-inline: 1.2rem;
    inset-block-end: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: .12rem;
    color: #fff;
}

.ih-deal-visual__caption span { color: #b9d9d8; font-size: .66rem; }
.ih-deal-visual__caption strong { font-size: .92rem; }

.ih-deal-visual__fallback {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at var(--mx, 74%) var(--my, 30%), rgba(30, 213, 203, .24), transparent 26%),
        linear-gradient(145deg, #003f50 0%, #006f73 50%, #00a09b 100%);
}

.ih-deal-visual__fallback::after {
    content: "";
    position: absolute;
    inset: auto -18% -48% auto;
    width: 72%;
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50%;
    box-shadow: 0 0 0 58px rgba(255,255,255,.035), 0 0 0 116px rgba(255,255,255,.025);
}

.ih-deal-orbit {
    position: absolute;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
    animation: ih-deal-orbit 16s linear infinite;
}
.ih-deal-orbit--one { width: 220px; height: 220px; inset: -82px auto auto -42px; }
.ih-deal-orbit--two { width: 320px; height: 320px; inset: auto auto -164px 12%; animation-direction: reverse; animation-duration: 22s; }
.ih-deal-orbit--three { width: 120px; height: 120px; inset: 24% 12% auto auto; animation-duration: 13s; }

@keyframes ih-deal-orbit { to { transform: rotate(360deg); } }

.ih-deal-visual__mark {
    position: absolute;
    inset-inline-start: 1.35rem;
    inset-block-start: 1.35rem;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 14px;
    background: rgba(0,21,27,.18);
    color: #fff;
    font-size: 1.35rem;
    backdrop-filter: blur(10px);
}

.ih-deal-visual__score {
    position: absolute;
    inset-inline-end: 1.5rem;
    inset-block-start: 1.5rem;
    width: 148px;
    aspect-ratio: 1;
    display: grid;
    place-content: center;
    text-align: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #006c71 61%, transparent 62%),
        conic-gradient(#99fff8 var(--deal-score), rgba(255,255,255,.16) 0);
    color: #fff;
    box-shadow: 0 20px 50px rgba(0,17,25,.2);
}

.ih-deal-visual__score strong { font-size: 2.45rem; line-height: .9; }
.ih-deal-visual__score > span { position: absolute; inset-inline-end: 34px; inset-block-start: 54px; font-size: .72rem; font-weight: 800; }
.ih-deal-visual__score small { max-width: 90px; margin: .42rem auto 0; color: #cce9e7; font-size: .58rem; line-height: 1.3; }

.ih-deal-visual__label {
    position: absolute;
    inset-inline-start: 1.45rem;
    inset-block-end: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    color: #fff;
}
.ih-deal-visual__label span { color: #bde3e1; font-size: .68rem; }
.ih-deal-visual__label strong { max-width: 20ch; font-size: 1.08rem; }

.ih-deal-visual__rail {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    border-inline-start: 1px solid rgba(255,255,255,.12);
}

.ih-deal-thumb { position: relative; min-height: 0; overflow: hidden; }
.ih-deal-thumb + .ih-deal-thumb { border-top: 1px solid rgba(255,255,255,.12); }
.ih-deal-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ih7-ease); }
@media (hover: hover) and (pointer: fine) { .ih-deal-thumb:hover img { transform: scale(1.06); } }

.ih-deal-rail-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: .2rem;
    padding: 1rem;
    color: #fff;
}
.ih-deal-rail-card + .ih-deal-rail-card { border-top: 1px solid rgba(255,255,255,.14); }
.ih-deal-rail-card.is-teal { background: linear-gradient(145deg, #008d91, #00aaa5); }
.ih-deal-rail-card.is-purple { background: linear-gradient(145deg, #49366e, #774b9c); }
.ih-deal-rail-card span { color: rgba(255,255,255,.7); font-size: .6rem; }
.ih-deal-rail-card strong { color: #fff; font-size: .94rem; line-height: 1.28; }
.ih-deal-rail-card small { color: rgba(255,255,255,.68); font-size: .56rem; line-height: 1.35; }

/* Snapshot */
.ih-deal-snapshot {
    display: grid;
    grid-template-columns: 1.25fr 1.15fr repeat(3, 1fr);
    margin: 0;
    border: 1px solid rgba(255,255,255,.12);
    border-bottom: 0;
    background: rgba(0,22,28,.62);
    backdrop-filter: blur(14px);
}

.ih-deal-snapshot > div {
    min-width: 0;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.1rem;
    border-inline-end: 1px solid rgba(255,255,255,.11);
}
.ih-deal-snapshot > div:last-child { border-inline-end: 0; }
.ih-deal-snapshot dt { color: #87a9ac; font-size: .58rem; font-weight: 700; }
.ih-deal-snapshot dd { margin: .3rem 0 0; overflow-wrap: anywhere; color: #fff; font-size: .86rem; font-weight: 760; line-height: 1.35; }
.ih-deal-snapshot > div:first-child dd { color: #8ffff6; font-size: 1.08rem; }

/* Section navigation */
.ih-deal-nav {
    position: sticky;
    inset-block-start: 103px;
    z-index: 20;
    border-bottom: 1px solid var(--deal-line);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(18px);
}

.ih-deal-nav__inner {
    min-height: 62px;
    display: flex;
    align-items: stretch;
    gap: .25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.ih-deal-nav__inner::-webkit-scrollbar { display: none; }

.ih-deal-nav a {
    position: relative;
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    padding: 0 .95rem;
    color: #6b7d81;
    font-size: .7rem;
    font-weight: 760;
    transition: color .2s ease;
}
.ih-deal-nav a::after {
    content: "";
    position: absolute;
    inset-inline: .95rem;
    inset-block-end: 0;
    height: 3px;
    transform: scaleX(0);
    background: var(--deal-teal);
    transition: transform .25s var(--ih7-ease);
}
.ih-deal-nav a:hover,
.ih-deal-nav a.is-active { color: var(--ih7-text); }
.ih-deal-nav a.is-active::after { transform: scaleX(1); }

/* Content */
.ih-deal-content { padding: clamp(2rem, 3vw, 3.25rem) 0 clamp(4rem, 6vw, 7rem); }

.ih-deal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: clamp(1.5rem, 3vw, 2.8rem);
    align-items: start;
}

.ih-deal-main {
    min-width: 0;
    display: grid;
    gap: 1rem;
}

.ih-deal-section {
    scroll-margin-top: 176px;
    padding: clamp(1.25rem, 2vw, 1.75rem);
    border: 1px solid var(--deal-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(4, 31, 39, .035);
}

.ih-deal-section--summary {
    background:
        radial-gradient(circle at 90% 10%, rgba(0,169,165,.1), transparent 24%),
        #fff;
}

.ih-deal-section__head {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    margin-bottom: 1rem;
}

.ih-deal-section__number {
    flex: 0 0 auto;
    min-width: 46px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #e7f7f7;
    color: #008b88;
    font-size: .68rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.ih-deal-section__head > div { min-width: 0; }
.ih-deal-section__eyebrow { display: block; margin-bottom: .18rem; color: #008b88; font-size: .6rem; font-weight: 800; }
.ih-deal-section__head h2 { font-size: clamp(1.35rem, 2vw, 2rem); font-weight: 720; }

.ih-deal-prose {
    max-width: 74ch;
    color: #4c6267;
    font-size: .9rem;
    line-height: 1.9;
    white-space: pre-line;
}

/* Readiness / Matching component normalization */
.ih-deal-readiness-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .9rem;
}
.ih-deal-readiness-grid.has-match { grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); }

.ih-deal-page .readiness-card,
.ih-deal-page .match-explainer {
    min-width: 0;
    margin: 0;
    padding: 1.15rem;
    border: 1px solid var(--deal-line);
    border-radius: 18px;
    background: #f9fbfb;
    box-shadow: none;
}

.ih-deal-page .readiness-card__head,
.ih-deal-page .match-explainer__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.ih-deal-page .readiness-card__eyebrow,
.ih-deal-page .match-explainer__eyebrow {
    color: #008b88;
    font-size: .6rem;
    font-weight: 800;
}

.ih-deal-page .readiness-card h2,
.ih-deal-page .match-explainer h2 {
    margin-top: .2rem;
    color: var(--ih7-text);
    font-size: 1.03rem;
}

.ih-deal-page .readiness-card__head p,
.ih-deal-page .match-explainer__head p {
    margin: .3rem 0 0;
    color: var(--ih7-muted);
    font-size: .66rem;
}

.ih-deal-page .readiness-score {
    flex: 0 0 auto;
    width: 78px;
    aspect-ratio: 1;
    display: grid;
    place-content: center;
    position: relative;
    border: 5px solid var(--deal-teal);
    border-radius: 50%;
    background: #fff;
    color: var(--ih7-text);
    box-shadow: inset 0 0 0 1px #d9e8e8;
    text-align: center;
}
.ih-deal-page .readiness-score strong { font-size: 1.35rem; line-height: 1; }
.ih-deal-page .readiness-score span { font-size: .58rem; font-weight: 800; }

.ih-deal-page .readiness-progress {
    height: 5px;
    margin: 1rem 0 .8rem;
    overflow: hidden;
    border-radius: 99px;
    background: #e3ebed;
}
.ih-deal-page .readiness-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--deal-blue), var(--deal-teal)); }

.ih-deal-page .readiness-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
}

.ih-deal-page .readiness-check {
    min-width: 0;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    padding: .68rem;
    border: 1px solid #e1eaec;
    border-radius: 12px;
    background: #fff;
}

.ih-deal-page .readiness-check__icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #e8f7f5;
    color: #008b88;
}
.ih-deal-page .readiness-check--missing .readiness-check__icon { background: #fff1f1; color: #ae4b52; }
.ih-deal-page .readiness-check--partial .readiness-check__icon { background: #fff7e9; color: #9a681f; }
.ih-deal-page .readiness-check > div { min-width: 0; }
.ih-deal-page .readiness-check strong { display: block; color: var(--ih7-text); font-size: .65rem; line-height: 1.3; }
.ih-deal-page .readiness-check small { display: block; margin-top: .15rem; color: var(--ih7-muted); font-size: .55rem; }
.ih-deal-page .readiness-check__points { color: #62787c; font-size: .58rem; font-weight: 780; white-space: nowrap; }
.ih-deal-page .readiness-card__disclaimer { display: flex; align-items: flex-start; gap: .45rem; margin: .8rem 0 0; color: var(--ih7-muted); font-size: .59rem; }

.ih-deal-page .match-explainer {
    background:
        radial-gradient(circle at 100% 0%, rgba(124,63,152,.14), transparent 32%),
        #f8f7fb;
}
.ih-deal-page .match-explainer__score { flex: 0 0 auto; color: var(--deal-purple); font-size: 1.15rem; font-weight: 850; white-space: nowrap; }
.ih-deal-page .match-explainer__reasons { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-top: .9rem; }
.ih-deal-page .match-explainer__reason {
    display: grid;
    grid-template-columns: 24px minmax(0,1fr) auto;
    align-items: center;
    gap: .45rem;
    padding: .55rem .6rem;
    border: 1px solid #e4dfeb;
    border-radius: 10px;
    background: rgba(255,255,255,.76);
    color: #536369;
    font-size: .6rem;
}
.ih-deal-page .match-explainer__reason i { color: var(--deal-purple); }
.ih-deal-page .match-explainer__reason.is-muted { opacity: .64; }
.ih-deal-page .match-explainer__reason small { color: #7a6689; font-weight: 800; }
.ih-deal-page .match-explainer > p { display: flex; gap: .4rem; margin: .75rem 0 0; color: var(--ih7-muted); font-size: .58rem; }

/* Insights */
.ih-deal-insights { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.ih-deal-insight {
    min-width: 0;
    padding: 1.15rem;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 18px;
    color: #fff;
    overflow: hidden;
}
.ih-deal-insight.is-strength { background: linear-gradient(145deg, #003d4f 0%, #006e73 100%); }
.ih-deal-insight.is-consideration { background: linear-gradient(145deg, #3d315e 0%, #704895 100%); }
.ih-deal-insight__top { display: flex; align-items: center; gap: .65rem; }
.ih-deal-insight__icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 11px; background: rgba(255,255,255,.08); }
.ih-deal-insight h3 { color: #fff; font-size: .96rem; }
.ih-deal-insight ul { margin: .9rem 0 0; padding-inline-start: 1.1rem; color: rgba(255,255,255,.77); font-size: .71rem; line-height: 1.75; }
.ih-deal-insight li + li { margin-top: .25rem; }

.ih-deal-note {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin: .75rem 0 0;
    padding: .72rem .85rem;
    border-radius: 11px;
    background: #edf1f2;
    color: #718186;
    font-size: .63rem;
}

/* Facts */
.ih-deal-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: .65rem;
    margin: 0;
}

.ih-deal-facts > div {
    min-width: 0;
    min-height: 114px;
    display: flex;
    flex-direction: column;
    padding: .9rem;
    border: 1px solid var(--deal-line);
    border-radius: 15px;
    background: #fbfcfc;
}

.ih-deal-fact__icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    margin-bottom: .6rem;
    border-radius: 9px;
    background: #e7f6f6;
    color: #008c89;
    font-size: .85rem;
}
.ih-deal-facts dt { color: #7b8b8f; font-size: .56rem; font-weight: 700; }
.ih-deal-facts dd { margin: .22rem 0 0; overflow-wrap: anywhere; color: var(--ih7-text); font-size: .7rem; font-weight: 760; line-height: 1.35; }

.ih-deal-legal {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: .65rem;
    margin: 0;
}
.ih-deal-legal > div {
    min-width: 0;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: .95rem;
    border: 1px solid var(--deal-line);
    border-radius: 14px;
    background: #fbfcfc;
}
.ih-deal-legal dt { color: #78898d; font-size: .57rem; font-weight: 700; }
.ih-deal-legal dd { display: flex; align-items: center; gap: .4rem; margin: .28rem 0 0; color: var(--ih7-text); font-size: .72rem; font-weight: 790; }
.ih-deal-legal .is-clear dd i { color: #078768; }
.ih-deal-legal .is-warning dd i { color: #b26828; }

/* Gallery */
.ih-deal-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.ih-deal-gallery a { position: relative; overflow: hidden; border-radius: 15px; aspect-ratio: 4/3; background: #dce5e7; }
.ih-deal-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ih7-ease); }
.ih-deal-gallery a > span { position: absolute; inset-inline-end: .65rem; inset-block-end: .65rem; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,20,28,.7); color: #fff; backdrop-filter: blur(8px); }
@media (hover: hover) and (pointer: fine) { .ih-deal-gallery a:hover img { transform: scale(1.045); } }

/* Documents */
.ih-deal-empty { min-height: 110px; display: flex; align-items: center; justify-content: center; gap: .65rem; padding: 1rem; border: 1px dashed var(--deal-line); border-radius: 14px; background: #fafcfc; color: var(--ih7-muted); text-align: center; }
.ih-deal-empty i { color: #009590; font-size: 1.2rem; }
.ih-deal-empty p { margin: 0; font-size: .72rem; }

.ih-deal-documents { display: grid; gap: .55rem; }
.ih-deal-documents article {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    border: 1px solid var(--deal-line);
    border-radius: 13px;
    background: #fbfcfc;
}
.ih-deal-document__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: #e7f6f6; color: #008f8b; }
.ih-deal-document__copy { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.ih-deal-document__copy strong { overflow: hidden; color: var(--ih7-text); font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.ih-deal-document__copy span { color: var(--ih7-muted); font-size: .58rem; }
.ih-deal-document__actions { display: flex; align-items: center; gap: .5rem; }
.ih-deal-document__actions a { min-height: 34px; display: inline-flex; align-items: center; padding: .35rem .55rem; border: 1px solid var(--deal-line); border-radius: 8px; background: #fff; color: #007c79; font-size: .6rem; font-weight: 760; }
.ih-deal-document__actions a:hover { border-color: #9fd8d5; background: #effafa; }

.ih-deal-private-note {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: .75rem;
    align-items: center;
    margin-top: .75rem;
    padding: .85rem;
    border-radius: 14px;
    background: linear-gradient(120deg, #002d3d, #004a49);
    color: #fff;
}
.ih-deal-private-note > span { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; color: #7ef1e8; }
.ih-deal-private-note strong { display: block; color: #fff; font-size: .73rem; }
.ih-deal-private-note p { margin: .12rem 0 0; color: #b9d0d1; font-size: .61rem; }

/* Sticky investment card */
.ih-deal-aside {
    position: sticky;
    inset-block-start: 180px;
    scroll-margin-top: 176px;
}

.ih-deal-interest-card {
    overflow: hidden;
    border: 1px solid #b9d0d4;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(0, 39, 48, .1);
}

.ih-deal-interest-card__top {
    position: relative;
    padding: 1.2rem 1.2rem 1rem;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 100% 0%, rgba(19,197,191,.3), transparent 36%),
        linear-gradient(135deg, #002839, #00595a);
}
.ih-deal-interest-card__top::after {
    content: "";
    position: absolute;
    inset-inline-end: -38px;
    inset-block-end: -78px;
    width: 150px;
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 50%;
}
.ih-deal-interest-card__top span { position: relative; z-index: 1; display: block; color: #a7c7c9; font-size: .59rem; }
.ih-deal-interest-card__top strong { position: relative; z-index: 1; display: block; margin-top: .18rem; color: #fff; font-size: clamp(1.55rem, 2.4vw, 2.15rem); line-height: 1.05; overflow-wrap: anywhere; }

.ih-deal-interest-card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--deal-line);
    background: #f6f9f9;
}
.ih-deal-interest-card__stats > div { min-width: 0; padding: .75rem .9rem; }
.ih-deal-interest-card__stats > div + div { border-inline-start: 1px solid var(--deal-line); }
.ih-deal-interest-card__stats span { display: block; color: #7a898d; font-size: .54rem; }
.ih-deal-interest-card__stats strong { display: block; margin-top: .15rem; color: var(--ih7-text); font-size: .66rem; line-height: 1.35; }

.ih-deal-interest-card__body { padding: 1rem 1.05rem; }
.ih-deal-interest-card__body h2 { margin-bottom: .35rem; font-size: 1rem; }
.ih-deal-interest-card__body > p { margin-bottom: .8rem; color: var(--ih7-muted); font-size: .65rem; }
.ih-deal-interest-card__hint { margin: .55rem 0 0 !important; color: var(--ih7-muted); font-size: .58rem !important; }

.ih-deal-interest-form { display: grid; gap: .7rem; }
.ih-deal-interest-form label { display: grid; gap: .32rem; color: var(--ih7-text); font-size: .63rem; font-weight: 760; }
.ih-deal-interest-form small { color: var(--ih7-muted); font-size: .56rem; font-weight: 500; }
.ih-deal-interest-form .form-select,
.ih-deal-interest-form .form-control { min-height: 46px; border-radius: 10px; font-size: .72rem; }
.ih-deal-interest-form textarea.form-control { min-height: 118px; }

.ih-deal-interest-state {
    display: grid;
    grid-template-columns: 36px minmax(0,1fr);
    gap: .65rem;
    align-items: start;
    margin-bottom: .7rem;
    padding: .75rem;
    border: 1px solid #cde3e4;
    border-radius: 12px;
    background: #eef8f8;
}
.ih-deal-interest-state > i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #dff3f2; color: #008b88; }
.ih-deal-interest-state strong { display: block; color: var(--ih7-text); font-size: .67rem; }
.ih-deal-interest-state span { display: block; margin-top: .12rem; color: var(--ih7-muted); font-size: .58rem; }

.ih-deal-interest-card__trust {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    padding: .75rem 1.05rem;
    border-top: 1px solid var(--deal-line);
    background: #fafcfc;
    color: #718387;
    font-size: .57rem;
}
.ih-deal-interest-card__trust i { color: #078768; }

/* Reveal / motion */
.ih-deal-page [data-deal-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .55s var(--ih7-ease), transform .55s var(--ih7-ease);
}
.ih-deal-page [data-deal-reveal].is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1199.98px) {
    .ih-deal-hero__grid { grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr); gap: 2rem; }
    .ih-deal-visual { grid-template-columns: minmax(0,1fr) 145px; }
    .ih-deal-layout { grid-template-columns: minmax(0,1fr) 310px; gap: 1.5rem; }
    .ih-deal-facts { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .ih-deal-readiness-grid.has-match { grid-template-columns: 1fr; }
}

@media (max-width: 991.98px) {
    .ih-deal-nav { inset-block-start: 72px; }
    .ih-deal-section, .ih-deal-aside { scroll-margin-top: 138px; }
    .ih-deal-hero__grid { grid-template-columns: 1fr; }
    .ih-deal-hero__copy { max-width: 820px; padding-bottom: .2rem; }
    .ih-deal-hero h1 { max-width: 16ch; }
    .ih-deal-visual { height: 430px; }
    .ih-deal-snapshot { grid-template-columns: repeat(3, 1fr); }
    .ih-deal-snapshot > div:nth-child(3) { border-inline-end: 0; }
    .ih-deal-snapshot > div:nth-child(n+4) { border-top: 1px solid rgba(255,255,255,.11); }
    .ih-deal-layout { grid-template-columns: 1fr; }
    .ih-deal-aside { position: static; order: -1; }
    .ih-deal-interest-card { display: grid; grid-template-columns: minmax(250px,.7fr) minmax(0,1.3fr); }
    .ih-deal-interest-card__top { min-height: 100%; display: flex; flex-direction: column; justify-content: center; }
    .ih-deal-interest-card__stats { grid-column: 1; }
    .ih-deal-interest-card__body { grid-column: 2; grid-row: 1 / span 2; }
    .ih-deal-interest-card__trust { grid-column: 1 / -1; }
    .ih-deal-facts { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

@media (max-width: 767.98px) {
    .ih-deal-nav { inset-block-start: 66px; }
    .ih-deal-section, .ih-deal-aside { scroll-margin-top: 126px; }
    .container { width: min(calc(100% - 28px), var(--ih7-max)); }
    .ih-deal-hero { padding-top: 1rem; }
    .ih-deal-toolbar { margin-bottom: .75rem; }
    .ih-deal-back span,
    .ih-deal-save span { display: none; }
    .ih-deal-back,
    .ih-deal-save { width: 42px; padding: 0; }
    .ih-deal-hero__copy { padding-top: .45rem; }
    .ih-deal-hero h1 { font-size: clamp(2.25rem, 10vw, 3.7rem); }
    .ih-deal-visual { grid-template-columns: 1fr; height: auto; border-radius: 22px 22px 0 0; }
    .ih-deal-visual__main { min-height: 330px; }
    .ih-deal-visual__rail { grid-template-columns: 1fr 1fr; grid-template-rows: 120px; border-inline-start: 0; border-top: 1px solid rgba(255,255,255,.12); }
    .ih-deal-rail-card + .ih-deal-rail-card,
    .ih-deal-thumb + .ih-deal-thumb { border-top: 0; border-inline-start: 1px solid rgba(255,255,255,.12); }
    .ih-deal-visual__score { width: 122px; }
    .ih-deal-visual__score strong { font-size: 2rem; }
    .ih-deal-visual__score > span { inset-inline-end: 28px; inset-block-start: 44px; }
    .ih-deal-snapshot { grid-template-columns: 1fr 1fr; }
    .ih-deal-snapshot > div { min-height: 78px; border-top: 1px solid rgba(255,255,255,.1); }
    .ih-deal-snapshot > div:nth-child(odd) { border-inline-end: 1px solid rgba(255,255,255,.11); }
    .ih-deal-snapshot > div:nth-child(even) { border-inline-end: 0; }
    .ih-deal-snapshot > div:first-child,
    .ih-deal-snapshot > div:nth-child(2) { border-top: 0; }
    .ih-deal-nav__inner { min-height: 54px; }
    .ih-deal-nav a { padding-inline: .7rem; }
    .ih-deal-section { border-radius: 17px; }
    .ih-deal-section__head { gap: .65rem; }
    .ih-deal-section__number { min-width: 40px; height: 30px; }
    .ih-deal-readiness-grid.has-match { grid-template-columns: 1fr; }
    .ih-deal-page .readiness-checks,
    .ih-deal-page .match-explainer__reasons { grid-template-columns: 1fr; }
    .ih-deal-insights { grid-template-columns: 1fr; }
    .ih-deal-facts { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .ih-deal-legal { grid-template-columns: 1fr; }
    .ih-deal-gallery { grid-template-columns: 1fr 1fr; }
    .ih-deal-interest-card { display: block; }
    .ih-deal-interest-card__top { min-height: auto; }
    .ih-deal-interest-card__stats,
    .ih-deal-interest-card__body,
    .ih-deal-interest-card__trust { grid-column: auto; grid-row: auto; }
    .ih-deal-documents article { grid-template-columns: 38px minmax(0,1fr); }
    .ih-deal-document__icon { width: 38px; height: 38px; }
    .ih-deal-document__actions { grid-column: 2; flex-wrap: wrap; }
}

@media (max-width: 479.98px) {
    .ih-deal-hero__actions { align-items: stretch; }
    .ih-deal-hero__actions .btn { flex: 1 1 auto; }
    .ih-deal-visual__main { min-height: 290px; }
    .ih-deal-visual__score { width: 108px; inset-inline-end: 1rem; inset-block-start: 1rem; }
    .ih-deal-visual__score strong { font-size: 1.7rem; }
    .ih-deal-visual__score > span { inset-inline-end: 23px; inset-block-start: 38px; }
    .ih-deal-visual__mark { inset-inline-start: 1rem; inset-block-start: 1rem; }
    .ih-deal-snapshot { grid-template-columns: 1fr; }
    .ih-deal-snapshot > div { border-inline-end: 0 !important; }
    .ih-deal-snapshot > div:nth-child(2) { border-top: 1px solid rgba(255,255,255,.1); }
    .ih-deal-section { padding: 1rem; }
    .ih-deal-section__head h2 { font-size: 1.28rem; }
    .ih-deal-facts { grid-template-columns: 1fr; }
    .ih-deal-gallery { grid-template-columns: 1fr; }
    .ih-deal-page .readiness-card__head,
    .ih-deal-page .match-explainer__head { align-items: center; }
    .ih-deal-page .readiness-score { width: 68px; }
}

@media (prefers-reduced-motion: reduce) {
    .ih-deal-page *,
    .ih-deal-page *::before,
    .ih-deal-page *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .001ms !important;
    }
    .ih-deal-page [data-deal-reveal] { opacity: 1; transform: none; }
}
