.sr {
    --sr-accent: #2F7387;
    --sr-accent-soft: #B0CAD1;
    --sr-accent-tint: #F0F5F7;
    --sr-market: #B3BCC5;
    --sr-ink: #1C2730;
    --sr-text: #3A4651;
    --sr-muted: #5E6A75;
    --sr-line: #E3E6EA;
    --sr-down: #9A4410;
    --sr-down-bg: #FCEEE4;
    --sr-up: #1B6B3F;
    --sr-up-bg: #E8F4EC;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: clamp(16px, 3vw, 32px) !important;
    color: var(--sr-ink);
    font-size: 14px;
    line-height: 1.5;
}

.sr h1, .sr h2, .sr h3, .sr p { margin: 0; }
.sr h2 { font-size: 17px; line-height: 1.3; font-weight: 600; color: var(--sr-ink); }
.sr h3 { font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--sr-ink); }
/* main.css centres .company_area_list h3 on phones */
.company_area_list.sr h3 { text-align: left; }
.sr-num { font-variant-numeric: tabular-nums lining-nums; }
.sr-strong { font-weight: 600; color: var(--sr-ink); }
.sr-muted { color: var(--sr-muted); }
.sr-down { color: var(--sr-down); }
.sr-up { color: var(--sr-up); }
.sr-up-blue { color: #1A64A6; }

.sr-fill { background: var(--sr-accent); }
.sr-fill-soft { background: var(--sr-accent-soft); }
.sr-fill-market { background: var(--sr-market); }

/* main.css has * { border-radius: 5px !important }: every radius here needs !important */

/* --- tooltips --- */

.sr [data-tip] { position: relative; cursor: default; outline: none; }
.sr [data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translate(-50%, 4px);
    width: max-content;
    max-width: 300px;
    padding: 6px 9px;
    border-radius: 6px !important;
    background: var(--sr-ink);
    color: #FFFFFF;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .12s ease, transform .12s ease, visibility 0s .12s;
    z-index: 20;
}
.sr [data-tip]:hover::after,
.sr [data-tip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity .12s ease, transform .12s ease;
}
.sr [data-tip]:focus-visible { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--sr-accent); border-radius: 6px !important; }

@media (prefers-reduced-motion: reduce) {
    .sr [data-tip]::after { transition: none; }
}

/* --- header --- */

.sr-head { display: flex; flex-direction: column; gap: 14px; }

.sr-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.sr-crumbs span { color: #4A5662; }

.sr-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; }
.sr-head-text { display: flex; flex-direction: column; gap: 12px; flex: 1 1 560px; min-width: 0; }

.sr h1 {
    font-size: clamp(22px, 2.4vw, 28px);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.sr-alert { margin: 0; }

.sr-lead { font-size: 16px; color: var(--sr-text); max-width: 720px; text-wrap: pretty; }
.sr-lead strong { color: var(--sr-ink); }
.sr-lead .sr-down { color: var(--sr-down); }
.sr-lead .sr-up { color: var(--sr-up); }

.sr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.sr-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px !important;
    background: #F1F3F5;
    font-size: 13px;
    color: var(--sr-text);
}
.sr-chip--very-high, .sr-chip--high { background: var(--sr-up-bg); color: var(--sr-up); font-weight: 500; }
.sr-chip--medium { background: #E8F0F8; color: #1A64A6; font-weight: 500; }
.sr-chip--low { background: var(--sr-down-bg); color: var(--sr-down); font-weight: 500; }

.sr-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 6px !important;
    background: #1A64A6;
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    text-decoration: none !important;
    transition: background .12s ease;
}
.sr-cta:hover, .sr-cta:focus { background: #124C80; }

/* --- cards --- */

.sr-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 600px) {
    .sr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sr-cards > .sr-card:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1200px) {
    .sr-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sr-cards > .sr-card:last-child { grid-column: auto; }
}
.sr-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 16px; }

.sr-card {
    border: 1px solid var(--sr-line);
    border-radius: 10px !important;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.sr-card-head { display: flex; flex-direction: column; gap: 3px; }
.sr-card-head > span { font-size: 13px; color: var(--sr-muted); }
.sr-card-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }

.sr-big { font-size: 34px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.sr-big-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.sr-donut-row { display: flex; align-items: center; gap: 18px; }
.sr-donut {
    --ac: 0;
    flex: none;
    width: 92px;
    height: 92px;
    border-radius: 50% !important;
    background: conic-gradient(var(--sr-accent-soft) 0 calc(var(--ac) * 1%), var(--sr-accent) calc(var(--ac) * 1%) 100%);
    display: grid;
    place-items: center;
}
.sr-donut-hole {
    width: 62px;
    height: 62px;
    border-radius: 50% !important;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
}
.sr-donut-hole strong { font-size: 16px; font-weight: 700; color: var(--sr-ink); }
.sr-donut-hole small { font-size: 9.5px; color: var(--sr-muted); max-width: 54px; }

.sr-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.sr-legend > div { display: flex; align-items: center; gap: 8px; }
.sr-legend-name { flex: 1; min-width: 0; color: var(--sr-text); }
.sr-legend .sr-strong { font-size: 14px; }
.sr-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px !important; flex: none; }

.sr-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px !important;
    font-size: 13px;
    font-weight: 600;
}
.sr-delta--down { background: var(--sr-down-bg); color: var(--sr-down); }
.sr-delta--up { background: var(--sr-up-bg); color: var(--sr-up); }

.sr-compare { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.sr-compare > div { display: flex; flex-direction: column; gap: 5px; }
.sr-compare-row { display: flex; justify-content: space-between; gap: 12px; color: var(--sr-text); }
.sr-compare-row .sr-strong { font-size: 14px; }

.sr-track { height: 10px; border-radius: 5px !important; background: #F1F3F5; }
.sr-track > div { height: 100%; border-radius: 5px !important; transition: filter .12s ease; }
.sr-track--tall { height: 20px; border-radius: 4px !important; background: #F6F7F8; }
.sr-track--tall > div { border-radius: 4px !important; }
.sr-bar:hover > div, .sr-bar:focus-visible > div { filter: brightness(.88); }

.sr-range { display: flex; flex-direction: column; gap: 8px; padding-top: 22px; }
.sr-range-bar { position: relative; height: 10px; border-radius: 5px !important; background: var(--sr-accent-soft); }
.sr-range-label {
    position: absolute;
    top: -22px;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.sr-range-mark {
    position: absolute;
    top: -5px;
    width: 4px;
    height: 20px;
    margin-left: -2px;
    border-radius: 2px !important;
    background: var(--sr-ink);
}
.sr-range-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--sr-muted); }
.sr-range-ends strong { color: var(--sr-ink); font-weight: 600; font-size: 14px; }

/* --- distribution --- */

.sr-hist { display: flex; flex-direction: column; gap: 8px; }
.sr-hist-bars { position: relative; display: flex; align-items: flex-end; gap: 10px; height: 172px; border-bottom: 1px solid #C9D0D6; }
/* tips centre on the chart, not on the bar: on the edge bars they spilled off the page */
.sr .sr-hist-col { position: static; }
.sr .sr-hist-col::after { max-width: 100%; }
.sr-hist-col {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    border-radius: 4px 4px 0 0 !important;
}
.sr-hist-col > div { width: 100%; height: var(--h); border-radius: 4px 4px 0 0 !important; transition: opacity .12s ease; }
.sr .sr-hist-col::after { bottom: calc(var(--h) + 30px); }
.sr-hist-bars:hover .sr-hist-col:not(:hover) > div { opacity: .45; }
.sr-hist-labels { display: flex; gap: 10px; font-size: 12px; color: var(--sr-muted); text-align: center; line-height: 1.35; }
.sr-hist-labels span { flex: 1 1 0; min-width: 0; }
.sr-hist-labels .sr-strong { color: var(--sr-ink); }

.sr-note { font-size: 14px; color: var(--sr-text); text-wrap: pretty; }

/* --- seniority --- */

.sr-key { display: flex; gap: 14px; font-size: 13px; color: var(--sr-text); }
.sr-key > span { display: inline-flex; align-items: center; gap: 6px; }

.sr-level { display: flex; flex-direction: column; gap: 10px; }
.sr-level + .sr-level { padding-top: 18px; border-top: 1px solid #EEF0F2; }
.sr-level-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sr-level-bar { display: flex; align-items: center; gap: 12px; }
.sr-level-bar .sr-track { flex: 1; }
.sr-level-bar > span { width: 72px; text-align: right; font-size: 14px; }

/* --- other roles --- */

.sr-roles { gap: 18px; }
.sr-roles ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sr-roles li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    padding: 12px 16px;
    border-radius: 8px !important;
    transition: background .12s ease;
}
.sr-roles li:not(.sr-roles-this):hover { background: #F6F7F8; }
.sr-roles li.sr-roles-this { background: var(--sr-accent-tint); box-shadow: inset 0 0 0 1px var(--sr-accent-soft); }
.sr-roles-name { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; font-weight: 500; color: var(--sr-ink); }
a.sr-roles-name { color: #1A64A6; }
a.sr-roles-name:hover, a.sr-roles-name:focus { color: #124C80; text-decoration: underline; }
.sr-roles-this .sr-roles-name { font-weight: 600; }
.sr-roles-badge {
    padding: 2px 8px;
    border-radius: 999px !important;
    background: #FFFFFF;
    color: var(--sr-accent);
    font-size: 12px;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px var(--sr-accent-soft);
}
.sr-roles-bar { flex: 2 1 300px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.sr-roles-bar .sr-track { flex: 1; }
.sr-roles-this .sr-track { background: #FFFFFF; }
.sr-roles-value { width: 72px; text-align: right; font-size: 15px; font-weight: 700; }
.sr-roles-diff { width: 88px; display: inline-flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.sr-roles-diff.sr-muted { font-weight: 400; }

/* --- faq --- */

.sr-faq { display: flex; flex-direction: column; gap: 16px; }
.sr-faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 22px 40px; }
.sr-faq-grid > div { display: flex; flex-direction: column; gap: 6px; }
.sr-faq p { color: var(--sr-text); text-wrap: pretty; }

/* --- similar companies --- */

.sr-similar { display: flex; flex-direction: column; gap: 16px; }
.sr-similar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.sr-similar-grid a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 9px 14px 9px 10px;
    border: 1px solid var(--sr-line);
    border-radius: 8px !important;
    color: var(--sr-ink);
    text-decoration: none;
    transition: border-color .12s ease, background .12s ease;
}
.sr-similar-grid a:hover, .sr-similar-grid a:focus { border-color: var(--sr-accent-soft); background: var(--sr-accent-tint); }
.sr-logo {
    width: 44px;
    height: 36px;
    flex: none;
    border-radius: 6px !important;
    background: #FFFFFF;
    box-shadow: inset 0 0 0 1px #EEF0F2;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.sr-logo-img { display: block; max-width: 34px; max-height: 26px; object-fit: contain; }
@media (min-width: 1200px) {
    .sr-logo-img { max-width: 30px; max-height: 23px; }
}
.sr-similar-name { flex: 1; min-width: 0; font-weight: 500; font-size: 14px; }
