/* ── Wrapper ── */
.tti-wrap {
    max-width: 1400px;
    margin: 32px auto;
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: #001769;
}

/* ── 5-column grid ── */
.tti-columns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    align-items: start;
}

.tti-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tti-col-title {
    font-family: 'Figtree', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #2096fc;
    margin-bottom: 10px;
    padding-left: 14px;
}

.tti-col-card {
    background: #eef2f7;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tti-item {
    position: relative;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px 14px 11px;
}

.tti-item--empty {
    color: #8a9ab0;
    font-size: 13px;
    text-align: center;
    padding: 18px 10px;
}

.tti-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.tti-item-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #8a9ab0;
    flex: 1;
    min-width: 0;
}

/* ── Info button + tooltip ── */
.tti-info-btn {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    border: 1px solid #c8d4e0;
    background: #ffffff;
    color: #8a9ab0;
    border-radius: 50%;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tti-info-btn:hover,
.tti-info-btn:focus {
    background: #2096fc;
    border-color: #2096fc;
    color: #ffffff;
    outline: none;
}

.tti-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 10px;
    width: 260px;
    max-width: calc(100vw - 40px);
    background: #001769;
    color: #ffffff;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(0, 23, 105, 0.18);
    font-size: 12px;
    line-height: 1.5;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none;
}

.tti-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 14px;
    border: 6px solid transparent;
    border-top-color: #001769;
}

.tti-info-btn:hover + .tti-tooltip,
.tti-info-btn:focus + .tti-tooltip,
.tti-tooltip:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.tti-tip-desc {
    margin: 0 0 8px 0;
    color: #ffffff;
}

.tti-tip-meta {
    margin: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.78);
}

.tti-tip-meta + .tti-tip-meta {
    margin-top: 2px;
}

.tti-tip-meta a {
    color: #7fb8ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tti-tip-meta a:hover {
    color: #ffffff;
}

.tti-tip-key {
    display: inline-block;
    min-width: 44px;
    font-weight: 700;
    color: #7fb8ff;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.08em;
    margin-right: 4px;
}

.tti-item-value {
    font-size: 22px;
    font-weight: 700;
    color: #001769;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

/* ── Timber Rundown (matches the column pattern above) ── */
.tti-rundown {
    margin-top: 28px;
}

.tti-rundown-title {
    font-family: 'Figtree', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #2096fc;
    margin: 0 0 10px 0;
    padding-left: 14px;
    text-transform: uppercase;
}

.tti-rundown-card {
    background: #eef2f7;
    border-radius: 14px;
    padding: 14px;
}

.tti-rundown-body {
    background: #ffffff;
    border-radius: 10px;
    padding: 18px 22px;
    font-size: 15px;
    line-height: 1.65;
    color: #333333;
}

.tti-rundown-body p {
    margin: 0 0 12px 0;
}

.tti-rundown-body p:last-child {
    margin-bottom: 0;
}

.tti-rundown-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 0 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.tti-rundown-updated {
    font-size: 11px;
    color: #9fb0c4;
}

.tti-rundown-disclaimer {
    font-size: 11px;
    color: #9fb0c4;
    font-style: italic;
}

/* ── Setup / empty state ── */
.tti-setup {
    padding: 24px;
    text-align: center;
    color: #666666;
    font-size: 14px;
}

.tti-setup a {
    color: #2096fc;
    font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .tti-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 720px) {
    .tti-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .tti-rundown {
        padding: 18px 18px 14px;
    }
    .tti-rundown-body {
        padding: 14px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tti-columns {
        grid-template-columns: 1fr;
    }
}

/* ── YoY change badges (ticker style) ── */
.tti-change {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}
.tti-change--up   { color: #1e9e4a; }
.tti-change--down { color: #d63638; }
.tti-change--flat { color: #8a9ab0; }

/* Whole-value colouring when the figure itself is the YoY % */
.tti-item-value--up   { color: #1e9e4a; }
.tti-item-value--down { color: #d63638; }
.tti-item-value--flat { color: #8a9ab0; }

/* ── Comparison basis ─ states what the percentage is measured against, on the
      card itself rather than hidden inside the tooltip. ── */
.tti-item-basis {
    font-size: 10px;
    font-weight: 600;
    color: #8a9ab0;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin-top: 3px;
}