.itm-card {
    --itm-gray: #8b95a1;
    --itm-accent: var(--itm-orange, #df7621);
    box-sizing: border-box;
    width: 100%;
    padding: 28px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background-color: var(--itm-card-bg, #ffffff);
    color: var(--itm-text, #172033);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    font-family: inherit;
}

.itm-card *, .itm-card *::before, .itm-card *::after { box-sizing: border-box; }
.itm-level-green { --itm-accent: var(--itm-green, #2f9e62); }
.itm-level-yellow { --itm-accent: var(--itm-yellow, #c99518); }
.itm-level-orange { --itm-accent: var(--itm-orange, #df7621); }
.itm-level-red { --itm-accent: var(--itm-red, #d04444); }
.itm-level-purple { --itm-accent: var(--itm-purple, #7d4bc1); }
.itm-level-gray { --itm-accent: var(--itm-gray, #8b95a1); }

.itm-card__topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.itm-eyebrow {
    margin-bottom: 6px;
    color: var(--itm-muted, #758197);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.itm-title { margin: 0; font-size: clamp(22px, 3vw, 32px); line-height: 1.1; color: var(--itm-text, #172033); }
.itm-updated { padding-top: 4px; color: var(--itm-muted, #758197); font-size: 12px; white-space: nowrap; }

.itm-main {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

.itm-score-wrap { display: flex; align-items: center; justify-content: center; }

.itm-score-ring {
    width: 142px;
    height: 142px;
    min-width: 142px;
    min-height: 142px;
    max-width: 142px;
    max-height: 142px;
    flex: 0 0 142px;
    aspect-ratio: 1 / 1;
    padding: 10px;
    border-radius: 50%;
    background: conic-gradient(var(--itm-accent) calc(var(--itm-score) * 1%), color-mix(in srgb, var(--itm-muted, #758197) 16%, transparent) 0);
}

.itm-score-ring__inner {
    display: flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--itm-card-bg, #ffffff);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05);
}

.itm-score-number { align-self: center; margin-left: 8px; color: var(--itm-text, #172033); font-size: 44px; font-weight: 800; line-height: 1; }
.itm-score-max { align-self: center; margin-top: 25px; color: var(--itm-muted, #758197); font-size: 13px; font-weight: 700; }

.itm-level-row { display: flex; align-items: center; gap: 10px; }
.itm-status-dot { width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%; background: var(--itm-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--itm-accent) 14%, transparent); }
.itm-level-label { color: var(--itm-text, #172033); font-size: clamp(20px, 2.5vw, 29px); font-weight: 800; line-height: 1.15; }
.itm-trend { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-left: 3px; border-radius: 10px; background: var(--itm-surface, #f7f8fa); font-size: 21px; font-weight: 800; }
.itm-trend-up { color: var(--itm-red, #d04444); }
.itm-trend-stable { color: var(--itm-muted, #758197); }
.itm-trend-down { color: var(--itm-green, #2f9e62); }
.itm-level-caption { margin-top: 5px; color: var(--itm-muted, #758197); font-size: 12px; }

.itm-bar { height: 8px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--itm-muted, #758197) 16%, transparent); }
.itm-bar__fill { display: block; height: 100%; border-radius: inherit; background: var(--itm-accent); }

.itm-hfc { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--itm-surface, #f7f8fa); }
.itm-hfc__label { color: var(--itm-muted, #758197); font-size: 12px; font-weight: 700; }
.itm-hfc__value { display: inline-flex; align-items: center; gap: 7px; color: var(--itm-text, #172033); font-size: 12px; font-weight: 800; }
.itm-hfc__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--itm-gray); }
.itm-hfc-green .itm-hfc__dot { background: var(--itm-green, #2f9e62); }
.itm-hfc-orange .itm-hfc__dot { background: var(--itm-orange, #df7621); }
.itm-hfc-red .itm-hfc__dot { background: var(--itm-red, #d04444); }

.itm-factors {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid color-mix(in srgb, var(--itm-muted, #758197) 14%, transparent);
}

.itm-factor { padding: 12px 13px; border: 1px solid color-mix(in srgb, var(--itm-muted, #758197) 14%, transparent); border-radius: 13px; background: var(--itm-surface, #f7f8fa); }
.itm-factor__head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 9px; color: var(--itm-muted, #758197); font-size: 12px; font-weight: 700; }
.itm-factor__head strong { color: var(--itm-text, #172033); }
.itm-factor__track { height: 5px; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--itm-muted, #758197) 18%, transparent); }
.itm-factor__track span { display: block; height: 100%; border-radius: inherit; background: var(--itm-accent); opacity: .82; }
.itm-factor__weight { margin-top: 7px; color: var(--itm-muted, #758197); font-size: 10px; }

.itm-note { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--itm-accent); border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--itm-accent) 5%, var(--itm-card-bg, #ffffff)); color: var(--itm-text, #172033); font-size: 13px; line-height: 1.55; }
.itm-disclaimer { margin-top: 18px; color: var(--itm-muted, #758197); font-size: 10px; line-height: 1.45; }

.itm-layout-compact { padding: 20px 22px; }
.itm-layout-compact .itm-card__topline { margin-bottom: 16px; }
.itm-layout-compact .itm-main { grid-template-columns: 92px minmax(0, 1fr); gap: 18px; }
.itm-layout-compact .itm-score-ring { width: 88px; height: 88px; min-width: 88px; min-height: 88px; max-width: 88px; max-height: 88px; flex-basis: 88px; padding: 7px; }
.itm-layout-compact .itm-score-number { margin-left: 5px; font-size: 28px; }
.itm-layout-compact .itm-score-max { margin-top: 15px; font-size: 9px; }
.itm-layout-compact .itm-level-label { font-size: 20px; }
.itm-layout-compact .itm-factors { display: none; }
.itm-layout-compact .itm-disclaimer { margin-top: 12px; }



/* Sidebar layout: optimized for narrow Elementor columns */
.itm-layout-sidebar {
    padding: 20px;
}

.itm-layout-sidebar .itm-card__topline {
    display: block;
    margin-bottom: 18px;
}

.itm-layout-sidebar .itm-updated {
    margin-top: 7px;
    padding-top: 0;
    white-space: normal;
    line-height: 1.35;
}

.itm-layout-sidebar .itm-main {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
}

.itm-layout-sidebar .itm-score-wrap {
    display: flex;
    width: 100%;
    justify-content: center;
}

.itm-layout-sidebar .itm-score-ring {
    width: 112px;
    height: 112px;
    min-width: 112px;
    min-height: 112px;
    max-width: 112px;
    max-height: 112px;
    flex: 0 0 112px;
    padding: 8px;
}

.itm-layout-sidebar .itm-score-number {
    margin-left: 6px;
    font-size: 34px;
}

.itm-layout-sidebar .itm-score-max {
    margin-top: 18px;
    font-size: 10px;
}

.itm-layout-sidebar .itm-summary {
    width: 100%;
    text-align: center;
}

.itm-layout-sidebar .itm-level-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.itm-layout-sidebar .itm-level-label {
    font-size: 21px;
}

.itm-layout-sidebar .itm-level-caption {
    max-width: 240px;
    margin: 7px auto 0;
    line-height: 1.45;
}

.itm-layout-sidebar .itm-bar {
    margin-top: 15px;
}

.itm-layout-sidebar .itm-hfc {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    text-align: center;
}

.itm-layout-sidebar .itm-note {
    margin-top: 15px;
}

.itm-layout-sidebar .itm-disclaimer {
    margin-top: 14px;
    font-size: 9px;
}

.itm-layout-sidebar .itm-factors {
    display: none;
}

@media (max-width: 700px) {
    .itm-card { padding: 21px; border-radius: 18px; }
    .itm-card__topline { display: block; }
    .itm-updated { margin-top: 8px; white-space: normal; }
    .itm-main { grid-template-columns: 105px minmax(0, 1fr); gap: 18px; }
    .itm-score-ring { width: 102px; height: 102px; min-width: 102px; min-height: 102px; max-width: 102px; max-height: 102px; flex-basis: 102px; }
    .itm-score-number { font-size: 31px; }
    .itm-factors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 460px) {
    .itm-main { grid-template-columns: 1fr; }
    .itm-score-wrap { display: none; }
    .itm-layout-sidebar .itm-score-wrap { display: flex; }
    .itm-level-row { flex-wrap: wrap; }
    .itm-hfc { align-items: flex-start; flex-direction: column; gap: 6px; }
    .itm-factors { grid-template-columns: 1fr; }
    .itm-layout-compact .itm-main { grid-template-columns: 1fr; }
    .itm-layout-sidebar .itm-main { display: flex; }
}
.itm-stale-label { color: var(--itm-red, #d04444); font-weight: 800; }
.itm-is-stale { opacity: .92; }
