/* Contractors directory + profile — new design. Scoped under .cnd so it never leaks into the theme. */
.cnd {
    --cnd-primary: #0B4A42;
    --cnd-ok: #16705F;
    --cnd-ok-bg: #E3F1E8;
    --cnd-accent: #F2B632;
    --cnd-text: #1B2A27;
    --cnd-text-2: #3F4D49;
    --cnd-muted: #55615D;
    --cnd-line: #DDE2DD;
    --cnd-line-soft: #EDF0ED;
    --cnd-field: #B8C2BC;
    --cnd-soft: #F4F6F3;
    --cnd-tile: #EEF3F0;
    --cnd-star: #D9A21B;
    --cnd-star-off: #CFD6D0;
    --cnd-peer: #2F6FB0;
    --cnd-bad: #A33A2A;
    color: var(--cnd-text);
    font-size: 14px;
    line-height: 1.6;
    background: #FFFFFF;
}
.cnd *, .cnd *::before, .cnd *::after { box-sizing: border-box; }
/* base rules carry one class of weight (:where) so any component class written later overrides them */
.cnd :where(h1, h2, h3) { margin: 0; color: inherit; }
.cnd a { color: inherit; text-decoration: none; }
.cnd :where(button) { font: inherit; cursor: pointer; }
.cnd :where(b, strong) { font-weight: 700; }
.cnd .num { font-variant-numeric: tabular-nums; }
.cnd .ltr { direction: ltr; unicode-bidi: isolate; }
.cnd [hidden] { display: none !important; }
/* side gutter grows with the screen so content never hugs the edges (PO, 25-Nov) */
.cnd-wrap { max-width: 1600px; margin: 0 auto; padding-inline: clamp(16px, 3vw, 48px); box-sizing: border-box; }
.cnd-wrap--narrow { max-width: 1600px; }

/* ---------- buttons, fields, chips ---------- */
.cnd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
    font-size: 14px; font-weight: 600; text-align: center; transition: background .15s, color .15s;
}
.cnd .cnd-btn--primary { background: var(--cnd-primary); color: #FFFFFF; }
.cnd .cnd-btn--primary:hover { background: #083A34; color: #FFFFFF; }
.cnd .cnd-btn--outline { background: #FFFFFF; color: var(--cnd-primary); border-color: var(--cnd-primary); }
.cnd .cnd-btn--ghost { background: #FFFFFF; color: var(--cnd-primary); border-color: var(--cnd-line); }
.cnd .cnd-btn--link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--cnd-primary); }
.cnd-btn:disabled { opacity: .6; cursor: default; }
.cnd-label { display: block; font-size: 12.5px; color: var(--cnd-muted); font-weight: 500; padding-bottom: 6px; }
.cnd-field {
    width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--cnd-field); border-radius: 12px;
    font: inherit; font-size: 14px; color: var(--cnd-text); background: #FFFFFF;
}
.cnd-field:focus, .cnd-btn:focus-visible, .cnd-pill:focus-visible { outline: 2px solid var(--cnd-accent); outline-offset: 2px; }
.cnd-check { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 14px; color: var(--cnd-text); cursor: pointer; }
.cnd-check input { width: 20px; height: 20px; accent-color: var(--cnd-primary); flex: none; margin: 0; }
.cnd-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 20px; }
.cnd-chip--ok { color: var(--cnd-ok); background: var(--cnd-ok-bg); }
.cnd-chip--dark { color: #FFFFFF; background: var(--cnd-primary); }
.cnd-chip--plain { color: var(--cnd-text-2); background: #FFFFFF; }
.cnd-pill {
    min-height: 44px; padding: 0 16px; border: 1px solid var(--cnd-line); border-radius: 22px;
    font-size: 13.5px; font-weight: 600; background: #FFFFFF; color: var(--cnd-text);
}
.cnd-pill[aria-selected="true"], .cnd-pill[aria-pressed="true"], .cnd-pill.is-on {
    background: var(--cnd-primary); border-color: var(--cnd-primary); color: #FFFFFF;
}
.cnd-pill--soft { border: 0; background: var(--cnd-soft); font-weight: 400; }
.cnd-pill .n { font-weight: 400; }

/* tooltip */
.cnd-tip { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -4px 0; padding: 0; border: 0; background: none; color: var(--cnd-muted); vertical-align: middle; cursor: help; }
.cnd-tip > span { display: none; position: absolute; bottom: calc(100% + 6px); inset-inline-start: -8px; z-index: 5; width: 230px; padding: 10px 12px; border-radius: 10px; background: var(--cnd-text); color: #FFFFFF; font-size: 12.5px; font-weight: 400; line-height: 1.7; text-align: start; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.cnd-tip:hover > span, .cnd-tip:focus > span { display: block; }

/* stars */
.cnd-stars { position: relative; display: inline-block; line-height: 1; letter-spacing: 2px; color: var(--cnd-star-off); direction: ltr; }
.cnd-stars > span { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; color: var(--cnd-star); }

/* membership rosette */
.cnd-medal { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.cnd-medal__label { font-size: 13px; font-weight: 600; color: #4A5560; line-height: 1.3; }

/* readiness badge colours (gradient top → bottom), keyed by tier level */
.cnd-tier--basic { --t1: #2E9E57; --t2: #7CCB6A; }
.cnd-tier--silver { --t1: #636363; --t2: #B4B4B4; }
.cnd-tier--gold { --t1: #B07F2A; --t2: #F7B23B; }
.cnd-tier--diamond { --t1: #0E78B8; --t2: #2AA7E3; }
.cnd-rchip { display: inline-flex; align-items: stretch; border-radius: 8px; overflow: hidden; background: #0A4A40; color: #FFFFFF; font-size: 12px; line-height: 1.2; }
.cnd-rchip__icon { display: grid; place-items: center; width: 26px; background: linear-gradient(180deg, var(--t1), var(--t2)); }
.cnd-rchip__text { padding-block: 4px; padding-inline: 12px 10px; }
.cnd-rcard { flex: none; display: block; width: 104px; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px rgba(11,74,66,.25); }
.cnd-rcard svg { display: block; width: 100%; height: auto; font-family: inherit; }
.cnd-ribbon { flex: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.18)); }
.cnd-ract { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 12px 0; border-bottom: 1px solid var(--cnd-line-soft); }
.cnd-ract__name { flex: 1 1 300px; min-width: 0; }
.cnd-ract__name b { display: block; font-size: 14.5px; font-weight: 600; }
.cnd-ract__name small { display: block; font-size: 12.5px; color: var(--cnd-muted); direction: ltr; text-align: end; }
[dir="rtl"] .cnd-ract__name small { text-align: right; }
[dir="ltr"] .cnd-ract__name small { text-align: left; }
.cnd-ract__tier { flex: 0 0 150px; display: inline-flex; align-items: center; gap: 12px; }
.cnd-ract__tier b { display: block; font-size: 14px; font-weight: 700; }
.cnd-ract__tier small { display: block; font-size: 12px; color: var(--cnd-muted); }
.cnd-ract__none { flex: 0 0 150px; font-size: 12.5px; color: var(--cnd-muted); }

/* key figures row (cards, profile facts, stats) */
.cnd-facts { display: flex; flex-wrap: wrap; gap: 10px 0; }
.cnd-fact { padding-inline-end: 18px; margin-inline-end: 18px; border-inline-end: 1px solid var(--cnd-line); }
.cnd-facts > .cnd-fact:last-child { padding-inline-end: 0; margin-inline-end: 0; border-inline-end: 0; } /* design: the last fact has no trailing space */
.cnd-fact__l { font-size: 12px; color: var(--cnd-muted); }
.cnd-fact__v { font-size: 14px; font-weight: 600; }
.cnd-fact__u { font-size: 12.5px; font-weight: 500; color: var(--cnd-muted); }
.cnd-facts--lg .cnd-fact { padding-inline-end: 26px; margin-inline-end: 26px; border-inline-end-color: #CFD6D0; }
.cnd-facts--lg .cnd-fact:last-child { border-inline-end-color: transparent; }
.cnd-facts--lg .cnd-fact__l { font-size: 12.5px; }
.cnd-facts--lg .cnd-fact__v { font-size: 19px; font-weight: 700; color: var(--cnd-primary); }
.cnd-facts--xl { gap: 12px 0; }
.cnd-facts--xl .cnd-fact { padding-inline-end: 28px; margin-inline-end: 28px; }
.cnd-facts--xl .cnd-fact__l { font-size: 12.5px; }
.cnd-facts--xl .cnd-fact__v { font-size: 28px; font-weight: 700; color: var(--cnd-primary); line-height: 1.35; }
.cnd-facts--xl .cnd-fact__u { font-size: 13px; }

/* ---------- directory hero ---------- */
.cnd-hero { background: linear-gradient(120deg, #0E5A4F 0%, #0B4A42 45%, #083A33 100%); color: #FFFFFF; }
.cnd-hero__in { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 28px 56px; padding-top: 52px; padding-bottom: 56px; }
.cnd-hero__main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cnd-hero h1 { font-size: 38px; font-weight: 700; line-height: 1.4; color: #FFFFFF; }
.cnd-hero__sub, .cnd-hero__label { color: #C9DAD6; }
.cnd-hero__sub { font-size: 15.5px; }
.cnd-hero__form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 720px; }
.cnd-hero__label { flex: 1 1 100%; font-size: 13px; }
.cnd-hero__field { position: relative; flex: 1 1 320px; min-width: 0; }
.cnd-hero__input { width: 100%; height: 60px; padding: 0 20px; padding-inline-end: 112px; border: 0; border-radius: 16px; font: inherit; font-size: 16.5px; color: var(--cnd-text); background: #FFFFFF; }
.cnd-hero__search { position: absolute; top: 7px; bottom: 7px; inset-inline-end: 7px; padding: 0 26px; border: 0; border-radius: 11px; background: var(--cnd-accent); color: var(--cnd-primary); font-size: 15.5px; font-weight: 700; }
.cnd-hero__adv { height: 60px; padding: 0 22px; border: 1px solid rgba(255,255,255,.55); border-radius: 16px; background: none; color: #FFFFFF; font-size: 15px; font-weight: 600; }
.cnd-hero__stats { flex: 1 1 300px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 0; }
.cnd-hero__stat { padding-inline-end: 26px; }
.cnd-hero__stat + .cnd-hero__stat { padding-inline-start: 0; }
.cnd-hero__stat:first-child { margin-inline-end: 26px; border-inline-end: 1px solid rgba(255,255,255,.25); }
.cnd-hero__stat b { display: block; font-size: 30px; font-weight: 700; }
.cnd-hero__stat span { font-size: 13px; color: #C9DAD6; }

/* ---------- directory body ---------- */
.cnd-dir { display: flex; flex-wrap: wrap; gap: 28px 44px; align-items: flex-start; padding-top: 28px; padding-bottom: 96px; }
.cnd-side { flex: 1 1 250px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cnd-side__head { display: flex; align-items: center; gap: 8px; }
.cnd-side__head h2 { flex: 1; font-size: 16px; font-weight: 700; }
.cnd-side__head .cnd-btn--link { font-size: 13px; }
.cnd-side > .cnd-btn--ghost { font-size: 13.5px; }
.cnd-results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cnd-results__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.cnd-results__count { flex: 1 1 200px; font-size: 14px; font-weight: 600; }
.cnd-results__bar label { font-size: 13px; color: var(--cnd-muted); }
.cnd-results__bar .cnd-field { width: auto; height: 44px; font-size: 13.5px; }
.cnd-cards { display: flex; flex-wrap: wrap; gap: 16px; }
.cnd-none { padding: 40px 0; text-align: center; font-size: 15px; color: var(--cnd-muted); }

.cnd-card { flex: 1 1 440px; min-width: 0; border: 1px solid var(--cnd-line); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 16px; background: #FFFFFF; }
.cnd-card__head { display: flex; align-items: flex-start; gap: 14px; }
.cnd-avatar { flex: none; width: 58px; height: 58px; border-radius: 16px; background: var(--cnd-tile); color: var(--cnd-primary); display: grid; place-items: center; font-weight: 700; font-size: 24px; overflow: hidden; }
.cnd-avatar img { width: 100%; height: 100%; object-fit: contain; background: #FFFFFF; }
.cnd-card__title { font-size: 17px; font-weight: 700; line-height: 1.5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cnd-card__title a:hover { color: var(--cnd-ok); }
.cnd-card__rating { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--cnd-text-2); }
.cnd-card__rating .cnd-stars { font-size: 15px; }
.cnd-card__rating .muted, .cnd-card__meta { color: var(--cnd-muted); }
.cnd-card__meta { font-size: 13px; padding-top: 2px; }
.cnd-card__chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* card figures: always 4 equal columns (2×2 on narrow cards) so no single figure drops to its own line */
.cnd-card { container-type: inline-size; }
.cnd-card .cnd-facts {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 0;
    padding: 12px 0; border-top: 1px solid var(--cnd-line-soft); border-bottom: 1px solid var(--cnd-line-soft);
}
.cnd-card .cnd-fact { min-width: 0; padding-inline: 12px; margin: 0; }
.cnd-card .cnd-fact:first-child { padding-inline-start: 0; }
.cnd-card .cnd-fact:last-child { padding-inline-end: 0; border-inline-end: 0; }
.cnd-card .cnd-fact__l { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.cnd-card .cnd-fact__l .cnd-tip { width: 18px; height: 18px; margin: 0; flex: none; }
.cnd-card .cnd-fact__v { overflow-wrap: anywhere; }
@container (max-width: 360px) {
    .cnd-card .cnd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cnd-card .cnd-fact:nth-child(2) { padding-inline-end: 0; border-inline-end: 0; }
    .cnd-card .cnd-fact:nth-child(3) { padding-inline-start: 0; }
}
.cnd-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.cnd-card__actions .cnd-btn { flex: 1 1 140px; }
.cnd-pagination { display: flex; justify-content: center; padding-top: 8px; max-width: 100%; }
/* the shared pagination template is wider than a phone: let it wrap instead of widening the page */
.cnd-pagination nav, .cnd-pagination .pagination { max-width: 100%; flex-wrap: wrap; justify-content: center; }

/* ---------- dialogs ---------- */
.cnd-dialog { position: fixed; inset: 0; z-index: 1050; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cnd-dialog__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(14,31,28,.5); cursor: default; }
.cnd-dialog__box { position: relative; width: 100%; max-width: 720px; max-height: 92vh; display: flex; flex-direction: column; background: #FFFFFF; border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.cnd-dialog__box--sm { max-width: 560px; }
.cnd-dialog__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--cnd-line-soft); }
.cnd-dialog__head > div { flex: 1; }
.cnd-dialog__head h2 { font-size: 18px; font-weight: 700; }
.cnd-dialog__head p { margin: 0; font-size: 12.5px; color: var(--cnd-muted); }
.cnd-dialog__x { width: 44px; height: 44px; margin: -8px; border: 0; background: none; color: var(--cnd-muted); font-size: 24px; line-height: 1; }
.cnd-dialog__body { overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 22px; }
.cnd-dialog__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--cnd-line-soft); }
.cnd-dialog__foot .spacer { margin-inline-end: auto; }
.cnd-row { display: flex; flex-wrap: wrap; gap: 14px; }
.cnd-row > * { flex: 1 1 260px; min-width: 0; }
.cnd-group-title { font-size: 14px; font-weight: 700; padding-bottom: 8px; }
.cnd-options { display: flex; flex-wrap: wrap; gap: 6px; }
.cnd-options .cnd-pill { font-weight: 400; }
.cnd-options .stars { color: #B07D0A; letter-spacing: 1px; margin-inline-end: 4px; }
.cnd-options .is-on .stars { color: var(--cnd-accent); }
.cnd-acts { display: flex; flex-wrap: wrap; gap: 0 28px; }
.cnd-acts .cnd-check { flex: 1 1 280px; min-height: 44px; border-bottom: 1px solid var(--cnd-line-soft); }
.cnd-alert { padding: 10px 14px; border-radius: 12px; font-size: 13.5px; }
.cnd-alert--error { background: #FBEAE7; color: var(--cnd-bad); }
.cnd-alert--ok { background: var(--cnd-ok-bg); color: var(--cnd-ok); }
.cnd-contracts { display: flex; flex-wrap: wrap; gap: 6px; max-height: 150px; overflow-y: auto; padding-top: 10px; }
.cnd-contracts .cnd-pill { min-height: 38px; padding: 0 14px; font-size: 13px; font-weight: 400; border-radius: 19px; }

/* toast */
.cnd-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 1100; background: var(--cnd-text); color: #FFFFFF; padding: 12px 20px; border-radius: 14px; font-size: 13.5px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.2); }

/* ---------- profile ---------- */
.cnd-head { background: var(--cnd-soft); }
.cnd-head__in { display: flex; flex-direction: column; gap: 18px; padding-top: 16px; padding-bottom: 30px; }
.cnd-head__back { align-self: flex-start; }
.cnd-head__id { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; }
.cnd-head__logo { flex: none; width: 84px; height: 84px; border-radius: 24px; background: var(--cnd-primary); color: var(--cnd-accent); display: grid; place-items: center; font-weight: 700; font-size: 38px; }
.cnd-head__img { flex: none; display: block; height: 92px; width: auto; max-width: 190px; padding: 6px 10px; border: 1px solid #E6EAE6; border-radius: 14px; background: #FFFFFF; object-fit: contain; }
.cnd-head__info { flex: 1 1 360px; min-width: 0; }
.cnd-head__chips { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 6px; }
.cnd-head h1 { font-size: 32px; font-weight: 700; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cnd-head__meta { font-size: 14px; color: var(--cnd-text-2); }
.cnd-head__rating { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--cnd-text); font-size: 14px; }
.cnd-head__rating .cnd-stars { font-size: 20px; }
.cnd-head__rating b { font-size: 17px; }
.cnd-head__rating span.muted { color: var(--cnd-muted); }
.cnd-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cnd-head__actions .cnd-btn { min-height: 50px; border-radius: 14px; }
.cnd-head__actions .cnd-btn--primary { padding: 0 26px; font-size: 15px; font-weight: 700; }
.cnd-head__actions .cnd-btn--ghost { border-color: #CFD6D0; }
.cnd-head .cnd-facts { padding-top: 6px; gap: 12px 0; }

.cnd-body { display: flex; flex-wrap: wrap; gap: 32px 52px; align-items: flex-start; padding-top: 24px; padding-bottom: 96px; }
.cnd-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 44px; }
.cnd-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cnd-tabs .cnd-pill { padding: 0 18px; }
.cnd-tabs .cnd-pill[aria-selected="true"] { font-weight: 600; }
.cnd-sec { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 20px; }
.cnd-sec :where(h2) { font-size: 19px; font-weight: 700; }
.cnd-sec :where(h3) { font-size: 14px; font-weight: 700; color: var(--cnd-primary); padding-top: 4px; }
.cnd-sec__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cnd-sec__note, .cnd-empty { font-size: 13px; color: var(--cnd-muted); }
.cnd-empty { font-size: 14px; }

/* activities */
.cnd-act-search { margin-inline-start: auto; flex: 0 1 320px; min-width: 0; height: 44px; }
.cnd-act-groups { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 40px; }
.cnd-act { flex: 1 1 320px; min-width: 0; border-bottom: 1px solid var(--cnd-line-soft); }
.cnd-act__btn { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0; background: none; border: 0; text-align: start; color: var(--cnd-text); }
.cnd-act__btn > span:first-child { flex: 1; min-width: 0; }
.cnd-act__t { display: block; font-size: 15px; font-weight: 600; }
.cnd-act__g { display: block; font-size: 12px; color: var(--cnd-muted); }
.cnd-act__n { font-size: 12.5px; color: var(--cnd-muted); }
.cnd-act__sign { width: 18px; text-align: center; color: var(--cnd-muted); font-size: 18px; }
.cnd-act ul { margin: 0; padding-block: 0 14px; padding-inline: 20px 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--cnd-text-2); }

/* key/value rows (readiness) */
.cnd-kv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 20px; padding: 10px 0; border-bottom: 1px solid var(--cnd-line-soft); }
.cnd-kv__k { flex: 0 0 110px; font-size: 12.5px; color: var(--cnd-muted); }
.cnd-kv__a { flex: 2 1 240px; font-size: 14.5px; font-weight: 600; }
.cnd-kv__b { flex: 1 1 140px; font-size: 13px; font-weight: 600; color: var(--cnd-ok); text-align: end; }
.cnd-quals { display: flex; flex-wrap: wrap; gap: 12px; }
.cnd-qual { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 18px; border: 1px solid var(--cnd-line); border-radius: 18px; background: #FFFFFF; }
.cnd-qual img { display: block; height: 130px; width: auto; max-width: 100%; object-fit: contain; }
.cnd-qual b { font-size: 15px; font-weight: 700; }

/* bars */
.cnd-bars { display: flex; flex-direction: column; gap: 7px; max-width: 720px; padding-top: 6px; }
.cnd-bar { display: flex; align-items: center; gap: 14px; }
.cnd-bar__t { flex: 0 0 190px; font-size: 13px; color: var(--cnd-text-2); }
.cnd-bar__track { flex: 1; min-width: 0; height: 8px; border-radius: 8px; background: var(--cnd-line-soft); }
.cnd-bar__fill { display: block; height: 8px; border-radius: 8px; background: var(--cnd-primary); }
.cnd-bar__v { flex: 0 0 64px; text-align: end; font-size: 13.5px; font-weight: 600; }

/* technical evaluation */
.cnd-seg { margin-inline-start: auto; display: flex; gap: 4px; padding: 4px; border-radius: 24px; background: var(--cnd-soft); }
.cnd-seg .cnd-pill { min-height: 40px; border: 0; border-radius: 20px; background: transparent; color: var(--cnd-text-2); }
.cnd-seg .cnd-pill[aria-selected="true"] { background: var(--cnd-primary); color: #FFFFFF; }
.cnd-tech { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; }
.cnd-tech svg { flex: 0 1 320px; width: 100%; max-width: 320px; height: auto; }
.cnd-tech__list { flex: 999 1 340px; min-width: 0; display: flex; flex-direction: column; }
.cnd-tech__legend { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 12.5px; color: var(--cnd-text-2); padding-bottom: 8px; }
.cnd-tech__legend span { display: inline-flex; align-items: center; gap: 8px; }
.cnd-tech__legend i { width: 18px; height: 4px; border-radius: 2px; background: var(--cnd-primary); }
.cnd-tech__legend i.peer { height: 0; border-top: 2px dashed var(--cnd-peer); background: none; }
.cnd-tech__row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--cnd-line-soft); }
.cnd-tech__i { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--cnd-soft); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--cnd-text-2); }
.cnd-tech__t { flex: 1 1 150px; min-width: 0; font-size: 13.5px; }
.cnd-tech__bars { flex: 1 1 90px; display: flex; flex-direction: column; gap: 3px; }
.cnd-tech__bars span { display: block; height: 5px; border-radius: 3px; background: var(--cnd-primary); }
.cnd-tech__bars span.peer { background: #7FA6D9; }
.cnd-tech__m { flex: 0 0 48px; text-align: end; font-size: 14px; font-weight: 700; color: var(--cnd-primary); }
.cnd-tech__p { flex: 0 0 44px; text-align: end; font-size: 13px; color: #2F5F96; }
.cnd-tech__d { flex: 0 0 52px; text-align: end; font-size: 12px; font-weight: 600; color: var(--cnd-ok); }
.cnd-tech__d.neg { color: var(--cnd-bad); }

/* contact aside */
.cnd-aside { flex: 1 1 300px; min-width: 0; position: sticky; top: 12px; border: 1px solid var(--cnd-line); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 4px; background: #FFFFFF; }
.cnd-aside h2 { font-size: 16px; font-weight: 700; padding-bottom: 6px; }
.cnd-copy { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 0; background: none; border: 0; border-bottom: 1px solid var(--cnd-line-soft); text-align: start; color: var(--cnd-text); width: 100%; }
.cnd-copy > span { flex: 1; min-width: 0; }
.cnd-copy small, .cnd-aside__l { display: block; font-size: 12px; color: var(--cnd-muted); }
.cnd-copy strong { display: block; font-size: 15px; font-weight: 600; direction: ltr; text-align: end; overflow-wrap: anywhere; }
[dir="rtl"] .cnd-copy strong { text-align: right; }
[dir="ltr"] .cnd-copy strong { text-align: left; }
.cnd-aside__addr { padding: 10px 0; }
.cnd-aside__addr div:last-child { font-size: 14px; font-weight: 600; }
.cnd-aside .cnd-btn--primary { min-height: 50px; margin-top: 8px; border-radius: 14px; font-size: 15px; font-weight: 700; }
.cnd-aside__note { font-size: 12px; color: var(--cnd-muted); padding-top: 8px; }
.cnd-social { display: flex; flex-wrap: wrap; gap: 6px; }
.cnd-social a { width: 44px; height: 44px; display: grid; place-items: center; color: var(--cnd-text); }
.cnd-social a:hover { color: var(--cnd-ok); }

/* missing data: kept visible but muted, so an incomplete profile reads as incomplete */
.cnd .is-empty .cnd-kv__a, .cnd .is-empty strong, .cnd .cnd-aside__addr.is-empty div:last-child { color: var(--cnd-muted); font-weight: 500; }

@media (max-width: 767.98px) {
    .cnd-hero h1 { font-size: 30px; }
    .cnd-head h1 { font-size: 24px; }
    .cnd-hero__in { padding-top: 28px; padding-bottom: 32px; }
    .cnd-aside { position: static; }
    .cnd-bar__t { flex-basis: 120px; }
    .cnd-act-search { flex-basis: 100%; margin-inline-start: 0; }
    .cnd-kv__b { text-align: start; }
    .cnd-facts--xl .cnd-fact__v { font-size: 24px; }
    .cnd-rcard { width: 76px; }
}

/* ===================== 24-Nov design ===================== */

/* hover/focus tooltips on icon buttons (verified, seal, readiness) */
.cnd-hint { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: help; flex: none; vertical-align: middle; }
.cnd-hint[data-cnd-level] { cursor: pointer; }
.cnd-tt { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 6; width: max-content; max-width: 240px; padding: 8px 12px; border-radius: 10px; background: var(--cnd-text); color: #FFFFFF; font-size: 12.5px; font-weight: 500; line-height: 1.6; text-align: center; white-space: normal; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.cnd-tt b { display: block; }
.cnd-tt--wide { max-width: 290px; text-align: start; }
.cnd-tt--below { bottom: auto; top: calc(100% + 8px); }
.cnd-hint:hover > .cnd-tt, .cnd-hint:focus-visible > .cnd-tt { display: block; }
.cnd-tip--end > span { inset-inline-start: auto; inset-inline-end: -8px; bottom: auto; top: calc(100% + 6px); }
.cnd-seal { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.18)); }
.cnd-arrow { display: inline-block; vertical-align: middle; margin-inline-start: 2px; }
.cnd-rchip-btn { min-height: 0; }

/* directory hero: SCA dotted arrows */
.cnd-hero { position: relative; overflow: hidden; }
.cnd-hero .cnd-wrap { position: relative; z-index: 1; }
/* 26-Nov design: dot grid + SCA arrow + glow, drawn once as an image */
.cnd-hero__art { position: absolute; inset: 0; background: url("../images/contractors-nd/hero-art.svg") center / cover no-repeat; pointer-events: none; }

/* profile header */
.cnd-head__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.cnd-crumbs { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 13px; color: var(--cnd-muted); }
.cnd-crumbs a { display: inline-flex; align-items: center; min-height: 36px; color: var(--cnd-primary); font-weight: 600; }
.cnd-crumbs [aria-current] { color: var(--cnd-text-2); }
.cnd-head__updated { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 12.5px; color: var(--cnd-text-2); }
.cnd-head__updated b { color: var(--cnd-primary); }
.cnd-rcard-btn { margin-inline-start: auto; }

/* readiness levels dialog */
.cnd-dialog__box--levels { max-width: 500px; overflow-y: auto; }
.cnd-levels__x { position: absolute; top: 10px; inset-inline-end: 10px; margin: 0; z-index: 1; }
.cnd-levels__head { display: flex; align-items: flex-start; gap: 18px; padding: 26px 26px 8px; }
.cnd-levels__head .cnd-ribbon { width: 52px; height: 96px; }
.cnd-levels__kicker { font-size: 12.5px; color: var(--cnd-muted); padding-top: 8px; }
.cnd-levels__title { font-size: 22px; font-weight: 700; color: var(--lv); }
.cnd-levels__en { font-size: 13px; color: var(--cnd-muted); }
.cnd-levels__body { display: flex; flex-direction: column; gap: 14px; padding: 14px 26px 0; }
.cnd-levels__pre { padding: 10px 14px; border-radius: 12px; background: var(--cnd-soft); font-size: 13px; color: var(--cnd-text-2); }
.cnd-levels__req-t { font-size: 14px; font-weight: 700; padding-bottom: 8px; }
.cnd-levels__req { display: flex; align-items: center; gap: 10px; min-height: 42px; margin-bottom: 6px; padding: 0 14px; border: 1px solid #E6EAE6; border-radius: 10px; font-size: 14px; }
.cnd-levels__req::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lv); }
.cnd-levels__act { font-size: 13px; color: var(--cnd-ok); font-weight: 600; }
.cnd-levels__steps { display: flex; gap: 6px; padding: 14px 26px 24px; }
.cnd-levels__step { flex: 1; min-height: 42px; border: 1px solid var(--cnd-line); border-radius: 10px; background: #FFFFFF; color: var(--cnd-text); font-size: 13px; font-weight: 600; }
.cnd-levels__step[aria-pressed="true"] { background: var(--lv); border-color: var(--lv); color: #FFFFFF; }
.cnd-tier--basic { --lv: #2E7D45; } .cnd-tier--silver { --lv: #5F6B76; } .cnd-tier--gold { --lv: #8A5A00; } .cnd-tier--diamond { --lv: #0B67A0; }

/* company details */
.cnd-idgrid { display: flex; flex-wrap: wrap; column-gap: 40px; }
.cnd-idrow { flex: 1 1 300px; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--cnd-line-soft); }
.cnd-idrow__l { flex: 0 0 140px; font-size: 13px; color: var(--cnd-muted); }
.cnd-idrow__v { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; text-align: start; overflow-wrap: anywhere; }
.cnd-idrow.is-empty .cnd-idrow__v { color: var(--cnd-muted); font-weight: 500; }
.cnd-idrow__copy { flex: 1; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0; border: 0; background: none; color: var(--cnd-primary); font-size: 14.5px; font-weight: 600; text-align: start; }

/* activities with readiness badges */
.cnd-acthead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cnd-acthead__t { flex: 1 1 260px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.cnd-acthead__tools { flex: 1 1 380px; max-width: 520px; display: flex; align-items: center; gap: 8px; }
.cnd-acthead__tools .cnd-field { flex: 1 1 220px; min-width: 0; height: 44px; }
.cnd .cnd-toggle { flex: none; min-height: 44px; white-space: nowrap; padding: 0 14px; font-size: 13px; }
.cnd .cnd-toggle[aria-pressed="true"] { background: var(--cnd-primary); border-color: var(--cnd-primary); color: #FFFFFF; }
.cnd-actgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px 32px; align-items: start; }
.cnd-actgroup { display: flex; flex-direction: column; min-width: 0; }
.cnd-actgroup__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 0 6px; border-bottom: 2px solid var(--cnd-text); }
.cnd-actgroup__h h3 { font-size: 15.5px; font-weight: 700; color: var(--cnd-text); padding: 0; }
.cnd-actgroup__h span { margin-inline-start: auto; font-size: 12px; color: var(--cnd-muted); }
.cnd-actrow { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 0; border-bottom: 1px solid var(--cnd-line-soft); }
.cnd-actrow__n { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.cnd-actrow__none { flex: none; font-size: 12.5px; color: var(--cnd-muted); white-space: nowrap; }
.cnd-bdg { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding-block: 2px; padding-inline: 6px 10px; border: 1px solid transparent; border-radius: 12px; background: none; color: var(--cnd-text); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.cnd-bdg:hover, .cnd-bdg:focus-visible { border-color: var(--cnd-line); background: #F7F8F6; }
.cnd-bdg .cnd-ribbon { width: 22px; height: 40px; }

/* sub headings, "data not available" chip, dotted status */
/* sub-section title: highlighted bar (design "sidebar titles", variant c); --na is the red "no data" one */
.cnd h3.cnd-sub { margin: 24px 0 0; padding: 10px 14px; border-inline-start: 4px solid #2E9E57; border-radius: 6px; background: #F5F8F6; font-size: 16.5px; font-weight: 700; line-height: 1.5; color: #14231F; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cnd h3.cnd-sub--first { margin-top: 4px; }
.cnd h3.cnd-sub--na { border-inline-start-color: #C2412D; background: #FDF3F1; }
.cnd-nodata { font-size: 11.5px; font-weight: 600; color: #9C2A1A; background: #F8DCD7; padding: 2px 10px; border-radius: 20px; }
.cnd-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--cnd-ok); padding-top: 4px; }
.cnd-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cnd-ok); }

/* ISO certificate cards */
.cnd-certs { display: flex; flex-wrap: wrap; gap: 12px; }
.cnd-cert { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--cnd-line); border-radius: 18px; background: #FFFFFF; }
.cnd-cert__mark { flex: none; display: block; color: #1F5A8F; }
.cnd-cert__mark--45001 { color: #9C3B22; } .cnd-cert__mark--14001 { color: #2E7D45; }
.cnd-cert__t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cnd-cert__t b { font-size: 15px; font-weight: 700; text-align: start; }
.cnd-cert__t > span:not(.cnd-dot) { font-size: 13px; color: var(--cnd-text-2); }

/* qualification entities: bigger logos (Abdulrahman #1) */
.cnd-qual { gap: 2px; }
.cnd-qual img { height: 130px; margin: 0; }
.cnd-qual > span { display: flex; flex-direction: column; min-width: 0; }
.cnd-qual small { font-size: 13px; color: var(--cnd-text-2); }

/* alliances */
.cnd-relgroup { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.cnd-rels { display: flex; flex-wrap: wrap; gap: 10px; }
.cnd-rel { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--cnd-line); border-radius: 16px; background: #FFFFFF; color: var(--cnd-text); text-align: start; }
a.cnd-rel:hover { border-color: var(--cnd-primary); box-shadow: 0 4px 14px rgba(11,74,66,.10); color: var(--cnd-text); }
.cnd-rel__init { flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--cnd-tile); color: var(--cnd-primary); display: grid; place-items: center; font-weight: 700; font-size: 20px; }
.cnd-rel__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cnd-rel__name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; }
.cnd-rel__rating { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--cnd-text-2); }
.cnd-rel__rating .cnd-stars { font-size: 14px; }
.cnd-rel__none { font-size: 12px; color: var(--cnd-muted); }
.cnd-rel__go { flex: none; font-size: 18px; color: var(--cnd-primary); }
.cnd-rchip--sm { align-self: flex-start; border-radius: 7px; font-size: 11.5px; }
.cnd-rchip--sm .cnd-rchip__icon { width: 22px; }
.cnd-rchip--sm .cnd-rchip__text { padding: 3px 9px; }

/* technical evaluation: legend under the chart, gold peer (design) */
.cnd-tech__chart { flex: 0 1 320px; width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 10px; }
.cnd-tech__chart svg { width: 100%; max-width: 320px; }
.cnd-tech__chart .cnd-tech__legend { justify-content: center; padding: 0; }
.cnd-tech__legend i.peer { border-top-color: #B07F2A; }
.cnd-tech__bars span.peer { background: #E9B54A; }
.cnd-tech__p { color: #8A5A00; }

/* contact aside */
.cnd-aside__head { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.cnd-aside__head h2 { padding: 0; }
.cnd-share { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--cnd-primary); font-size: 13.5px; font-weight: 600; }
.cnd-share:hover { background: #E6EEEA; }
.cnd-aside__row { padding: 10px 0; border-bottom: 1px solid var(--cnd-line-soft); }
.cnd-aside__link { display: inline-flex; align-items: center; min-height: 32px; font-size: 15px; font-weight: 600; color: var(--cnd-primary); }
.cnd-aside__v { font-size: 14px; font-weight: 600; line-height: 1.7; }
.cnd-aside__row.is-empty .cnd-aside__v { color: var(--cnd-muted); font-weight: 500; }
.cnd-social a, .cnd-social span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--cnd-ok); }
.cnd-social a:hover { color: #C9962A; }
.cnd-social .is-off { color: #C3CAC5; }
.cnd-na { display: flex; align-items: center; gap: 12px; }
.cnd-na__logo { flex: none; width: 28px; height: auto; display: block; }

/* page loader (Abdulrahman #3): shown while navigating to another page */
.cnd-loader { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: rgba(255,255,255,.6); }
.cnd-loader[hidden] { display: none; }
.cnd-loader::before { content: ""; width: 44px; height: 44px; border-radius: 50%; border: 4px solid #DDE2DD; border-top-color: #0B4A42; animation: cnd-spin .8s linear infinite; }
.cnd-loader::after { content: ""; position: fixed; top: 0; inset-inline-start: 0; height: 3px; width: 40%; background: #0B4A42; animation: cnd-bar 1.2s ease-in-out infinite; }
@keyframes cnd-spin { to { transform: rotate(360deg); } }
@keyframes cnd-bar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
[dir="rtl"] .cnd-loader::after { animation-name: cnd-bar-rtl; }
@keyframes cnd-bar-rtl { from { transform: translateX(100%); } to { transform: translateX(-250%); } }

@media (max-width: 767.98px) {
    /* Abdulrahman #5: contact first on mobile */
    .cnd-body .cnd-aside { order: -1; }
    .cnd-rcard-btn { margin-inline-start: 0; }
    .cnd-head__updated { margin-inline-start: 0; }
    .cnd-acthead__tools { flex-wrap: wrap; max-width: none; }
    .cnd-idrow__l { flex-basis: 120px; }
    .cnd-hero__art { display: none; }
}

/* ---------- profile "all" view: numbered section cards that open/close (design 26-Nov, variant "cards") ---------- */
.cnd-secbar { display: none; flex-wrap: wrap; align-items: center; gap: 8px; }
.cnd-main.is-all .cnd-secbar { display: flex; }
.cnd-secbar__sum { font-size: 12.5px; color: var(--cnd-muted); }
.cnd-secbar__sum + .cnd-btn { margin-inline-start: auto; }
.cnd .cnd-btn--sm { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; font-weight: 600; }
.cnd-sbar-h { display: none; margin: 0; }
.cnd-main.is-all { gap: 16px; }
.cnd-main.is-all > .cnd-sec { gap: 12px; padding-bottom: 24px; border: 1px solid #DDE2DD; border-radius: 20px; background: #FFFFFF; overflow: hidden; box-shadow: 0 1px 3px rgba(20,40,30,.05); }
.cnd-main.is-all > .cnd-sec > :not(.cnd-sbar-h) { margin-inline: 22px; }
.cnd-main.is-all > .cnd-sec > .cnd-sbar-h { display: block; margin-bottom: 6px; }
.cnd-main.is-all .cnd-sec__title { display: none; }
.cnd-main.is-all > .cnd-sec.is-collapsed { padding-bottom: 0; }
.cnd-main.is-all > .cnd-sec.is-collapsed > :not(.cnd-sbar-h) { display: none; }
.cnd-main.is-all > .cnd-sec.is-collapsed > .cnd-sbar-h { margin-bottom: 0; }
.cnd-sbar { width: 100%; min-height: 60px; padding: 0 18px; border: 0; border-inline-start: 5px solid #2E9E57; background: #F5F8F6; color: #14231F; display: flex; align-items: center; gap: 12px; text-align: start; font-size: 16.5px; font-weight: 700; }
.cnd-sbar:hover { background: #EDF3EF; }
.cnd-sbar[aria-expanded="true"] { border-bottom: 1px solid #E3E8E4; }
.cnd-sbar:focus-visible { outline: 3px solid var(--cnd-accent); outline-offset: -3px; }
.cnd-sbar__n { flex: none; width: 28px; height: 28px; border-radius: 8px; background: #2E9E57; color: #FFFFFF; display: grid; place-items: center; font-size: 13px; }
.cnd-sbar__t { flex: 1; min-width: 0; }
.cnd-sbar__st { font-size: 12px; font-weight: 500; color: var(--cnd-muted); }
.cnd-sbar__chev { flex: none; color: #3F4D49; transition: transform .2s; }
.cnd-sbar[aria-expanded="true"] .cnd-sbar__chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .cnd-sbar__chev { transition: none; } }
