:root {
    --bg: #08181D; --surface: #1A2B32; --surface-high: #1E3340;
    --puddles: #16F1F5; --tennis: #CCFF00; --orange: #FB9518;
    --slate: #8492A6; --deep-slate: #5B697D; --text-main: #F6F6F7;
    --mist-white: #F6F6F7;
    --sky: #5EB5FF;
    --lh: 1.55;
    --fs-body: 17px;
}
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    padding: 16px 12px;
    background: var(--bg);
    color: var(--text-main);
    font-family: 'Figtree', sans-serif;
    font-size: var(--fs-body);
    line-height: var(--lh);
}
.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--deep-slate);
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    box-sizing: border-box;
}
.page p,
.page .box li {
    line-height: var(--lh);
}
.header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    border-bottom: 2px solid var(--puddles);
    padding-bottom: 20px;
    margin-bottom: 24px;
}
.header h1 {
    font-family: 'Varela Round', sans-serif;
    font-size: clamp(1.75rem, 5.5vw, 2rem);
    margin: 0 0 5px 0;
    color: var(--puddles);
    line-height: 1.25;
}
.header p {
    margin: 0;
    color: var(--slate);
    font-size: 1rem;
    line-height: var(--lh);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.deal-terms {
    text-align: left;
    background: var(--surface-high);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--deep-slate);
    box-sizing: border-box;
}
.deal-terms div {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--tennis);
    line-height: var(--lh);
}
.deal-terms span {
    font-size: 0.875rem;
    color: var(--slate);
    line-height: var(--lh);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 22px;
}

h2 {
    font-family: 'Varela Round', sans-serif;
    font-size: clamp(1.25rem, 4vw, 1.375rem);
    border-bottom: 1px solid var(--deep-slate);
    padding-bottom: 8px;
    margin-top: 0;
    color: var(--text-main);
    line-height: 1.35;
}
h3 {
    font-size: 1rem;
    color: var(--puddles);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.box {
    background: var(--bg);
    border: 1px solid var(--deep-slate);
    border-radius: 8px;
    padding: 18px;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
}
.box.highlight { border-color: var(--puddles); background: rgba(22, 241, 245, 0.05); }

.metric { margin-bottom: 15px; }
.metric-val {
    font-family: 'Fira Code', monospace;
    font-size: clamp(1.35rem, 4vw, 1.5rem);
    font-weight: 700;
    color: var(--tennis);
    line-height: 1.25;
}
.metric-label {
    font-size: 0.8125rem;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.45;
}

ul { margin: 0; padding-left: 1.25rem; font-size: 1em; color: #D1D8E0; line-height: var(--lh); }
li { margin-bottom: 10px; }

.hero-callout {
    padding: 14px 16px !important;
    margin-bottom: 24px !important;
}
.hero-callout p {
    font-size: 1.0625rem !important;
    line-height: var(--lh) !important;
}

.ns-title-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
}
.ns-title-row h3 {
    overflow-wrap: anywhere;
    word-wrap: break-word;
    max-width: 100%;
}
.header > div:first-of-type img {
    flex-shrink: 0;
}

.dash-grid-top {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 12px;
    margin-bottom: 16px;
}
.dash-grid-certs {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 8px;
}
.pipeline-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 10px;
    align-items: start;
}
.b2c-three-col {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 18px;
}

.flywheel-steps {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
}

.use-funds-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
}

.proposal-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
}
.compliance-row {
    flex-wrap: wrap !important;
    gap: 10px !important;
}

/* Floor micro type (was 9–11px) for legibility */
.page [style*="font-size: 9px;"] { font-size: 12px !important; line-height: 1.45 !important; }
.page [style*="font-size: 10px;"] { font-size: 12px !important; line-height: 1.45 !important; }
.page [style*="font-size: 11px;"] { font-size: 13px !important; line-height: 1.5 !important; }

.page .box ul[style*="padding-left"] { font-size: 1.0625rem !important; line-height: var(--lh) !important; }
.page .box ul[style*="list-style-type: none"] { font-size: 1.0625rem !important; }
.page .box ul[style*="font-size: 14px"] { font-size: 1.0625rem !important; line-height: var(--lh) !important; }
.page .box li[style*="font-size: 13px"] { font-size: 1.0625rem !important; line-height: var(--lh) !important; }

.page h3[style*="font-size: 12px"] { font-size: 1rem !important; line-height: 1.45 !important; }
.page ul[style*="font-size: 12px"] { font-size: 1rem !important; line-height: var(--lh) !important; }
.page p[style*="font-size: 13px"] { font-size: 1.0625rem !important; line-height: var(--lh) !important; }

.ui-placeholder {
    width: 100%;
    min-height: 140px;
    height: auto;
    background: var(--surface-high);
    border: 1px dashed var(--slate);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    font-size: 0.875rem;
    font-family: 'Fira Code', monospace;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}
.ui-placeholder img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; filter: grayscale(50%); }
.ui-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.8);
    padding: 6px 10px;
    border-radius: 4px;
    color: var(--puddles);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.timeline { border-left: 2px solid var(--deep-slate); padding-left: 20px; margin-top: 20px; }
.tl-item { position: relative; margin-bottom: 20px; }
.tl-item::before { content: ''; position: absolute; left: -27px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--tennis); }
.tl-date { font-weight: 700; color: var(--puddles); font-size: 1rem; line-height: 1.45; }
.tl-desc { font-size: 1rem; color: var(--slate); line-height: var(--lh); }

@media (min-width: 768px) {
    body {
        padding: 40px 16px;
        font-size: 18px;
    }
    .page {
        padding: 40px;
        border-radius: 12px;
    }
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0;
        margin-bottom: 30px;
    }
    .deal-terms {
        text-align: right;
        padding: 12px 20px;
        flex-shrink: 0;
    }
    .deal-terms span { font-size: 0.875rem; }
    .grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        margin-bottom: 30px;
    }
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-bottom: 20px;
    }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 0.875rem; }
    .box { padding: 20px; height: 100%; }
    .metric-val { font-size: 1.5rem; }
    .metric-label { font-size: 0.75rem; }
    .hero-callout {
        padding: 16px 24px !important;
        margin-bottom: 30px !important;
    }
    .hero-callout p { font-size: 1rem !important; }
    .ns-title-row {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0 !important;
    }
    .dash-grid-top { grid-template-columns: 1fr 1fr !important; }
    .dash-grid-certs { grid-template-columns: 1fr 1fr !important; }
    .pipeline-grid {
        grid-template-columns: 1.5fr 1fr 1fr !important;
        align-items: center;
    }
    .b2c-three-col { grid-template-columns: 1fr 1.2fr 1fr !important; gap: 15px; }
    .flywheel-steps {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 4px !important;
    }
    .use-funds-head {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0 !important;
    }
    .proposal-row {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0 !important;
    }
    .page [style*="font-size: 9px;"] { font-size: 13px !important; }
    .page [style*="font-size: 10px;"] { font-size: 13px !important; }
    .page [style*="font-size: 11px;"] { font-size: 14px !important; }
}
