/* Ommaviy profil sahifasi — `/profil/<username>/`.
 *
 * Ranglar `main.css` dagi o'zgaruvchilardan olinadi, shuning uchun
 * qorong'i rejim alohida yozilmaydi: `[data-bs-theme="dark"]` o'sha
 * o'zgaruvchilarni almashtiradi va sahifa o'zi moslashadi.
 *
 * Faollik kalendari va reyting grafigi serverda tayyorlanadi; bu
 * yerda faqat ularning ko'rinishi.
 */

.pf {
  --pf-gap: 22px;
  background: var(--bg-alt);
  min-height: 60vh;
}

/* ----------------------------------------------------------- Yuqori qism */

.pf-hero {
  /* Firma ko'ki: profil sahifasining o'z «peshtoqi» bo'lsin. */
  background:
    radial-gradient(1100px 380px at 12% -40%, rgba(240, 90, 40, .28), transparent 60%),
    linear-gradient(160deg, var(--navy-800), var(--navy-900));
  color: #fff;
  padding: 26px 0 34px;
}

.pf-hero__crumb,
.pf-hero__crumb .active { color: rgba(255, 255, 255, .72); }
.pf-hero__crumb a { color: rgba(255, 255, 255, .72); text-decoration: none; }
.pf-hero__crumb a:hover { color: #fff; }

.pf-hero__row {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 26px; margin-top: 14px;
}

.pf-id { display: flex; align-items: center; gap: 22px; min-width: 0; }

.pf-avatar {
  flex-shrink: 0;
  width: 124px; height: 124px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--navy-600);
  font-size: 2.6rem; font-weight: 800; letter-spacing: .02em;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .16), var(--shadow-lg);
}
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; }

.pf-id__text { min-width: 0; }

.pf-name {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.35rem);
  font-weight: 800; line-height: 1.15; margin: 0; color: #fff;
}
.pf-handle {
  margin: 2px 0 10px; font-size: .92rem;
  color: rgba(255, 255, 255, .6); font-weight: 600;
}

.pf-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: .82rem; font-weight: 600; color: rgba(255, 255, 255, .92);
}
.pf-tag i { opacity: .8; }

/* Daraja nishoni oq fonda, matni esa darajaning rangida.
   Ranglar `contest/css/contest.css` dagilar bilan bir xil, lekin u fayl
   ommaviy saytda yuklanmaydi — shuning uchun shu yerda takrorlanadi.
   Ular yorug' fon uchun tanlangan, shuning uchun nishon oq. */
.pf-tag--tier {
  background: #fff; border-color: transparent; color: var(--navy-900);
}
.pf-tag--tier i { opacity: 1; }
.pf-tag--tier.oj-tier--novice      { color: #55677a; }
.pf-tag--tier.oj-tier--amateur     { color: #2e7d32; }
.pf-tag--tier.oj-tier--skilled     { color: #0f6f8c; }
.pf-tag--tier.oj-tier--strong      { color: #14568c; }
.pf-tag--tier.oj-tier--master      { color: #96590a; }
.pf-tag--tier.oj-tier--grandmaster { color: #b02a1c; }
.pf-tag--tier.oj-tier--olympian    { color: #6a1b9a; }

/* Sertifikat darajasi nishoni — oq fonda, olimpiada nishoni kabi. */
.pf-tag--cert { background: #fff; border-color: transparent; color: var(--navy-900); }
.pf-tag--cert i { color: var(--accent); opacity: 1; }

/* Onlayn belgisi: yashil nuqta — hozir saytda; kulrang — oxirgi kirgan vaqt. */
.pf-presence {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 10px;
  font-size: .8rem; font-weight: 600; color: rgba(255, 255, 255, .7);
}
.pf-presence i {
  width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .45);
}
.pf-presence.is-online { color: #7ee2a8; }
.pf-presence.is-online i { background: #2ecc71; box-shadow: 0 0 0 3px rgba(46, 204, 113, .25); }

.pf-note {
  margin: 10px 0 0; font-size: .82rem;
  color: var(--accent-on-dark-sm); display: flex; align-items: center; gap: 7px;
}

.pf-contacts { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.pf-contacts a {
  display: inline-flex; align-items: center; gap: 7px;
  color: rgba(255, 255, 255, .8); text-decoration: none; font-size: .86rem;
}
.pf-contacts a:hover { color: #fff; text-decoration: underline; }

.pf-edit {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; text-decoration: none; font-size: .84rem; font-weight: 600;
}
.pf-edit:hover { background: rgba(255, 255, 255, .24); color: #fff; }

.pf-key { display: flex; flex-wrap: wrap; gap: 10px; }
.pf-key__item {
  min-width: 118px; padding: 12px 16px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  text-align: center;
}
.pf-key__item b { display: block; font-size: 1.7rem; font-weight: 800; color: #fff; }
.pf-key__item span {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255, 255, 255, .62);
}

/* ------------------------------------------------------------- Bo'limlar */

.pf-body { padding: var(--pf-gap) 0 48px; display: grid; gap: var(--pf-gap); }

.pf-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.pf-card__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}
.pf-card__head h2 {
  margin: 0; font-size: 1.06rem; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.pf-card__head h2 i { color: var(--accent-ink); font-size: .96rem; }
.pf-card__sub { margin: 0; font-size: .85rem; color: var(--text-muted); }
.pf-card__link {
  margin-inline-start: auto; font-size: .84rem; font-weight: 600;
  color: var(--accent-ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
}
.pf-card__link:hover { text-decoration: underline; }
.pf-card__body { padding: 22px 24px; }

.pf-h3 {
  margin: 26px 0 14px; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted);
  display: flex; align-items: baseline; gap: 10px;
}
.pf-h3:first-child { margin-top: 0; }
.pf-h3 small { text-transform: none; letter-spacing: 0; color: var(--text-faint); }

.pf-empty { margin: 0; color: var(--text-muted); font-size: .9rem; }

/* -------------------------------------------------------- Faollik kalendari */

/* Tor ekranda to'r sig'maydi — u yon tomonga suriladi, sahifaning
   o'zi esa surilmaydi. */
.pf-cal-scroll { overflow-x: auto; padding-bottom: 6px; }
.pf-cal { display: flex; gap: 8px; min-width: max-content; }

.pf-cal__days {
  display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px;
  font-size: .66rem; color: var(--text-muted); padding-top: 1px;
}
.pf-cal__days span { line-height: 12px; height: 12px; }

.pf-cal__main { display: grid; gap: 4px; }
.pf-cal__months {
  display: grid; grid-auto-flow: column; grid-auto-columns: 15px; gap: 0;
  font-size: .66rem; color: var(--text-muted); height: 12px;
}
/* Oy nomi ustundan kengroq — qo'shni ustunlar ustidan oshib ketsin,
   lekin keyingi oy nomini surib yubormasin. */
.pf-cal__months span { overflow: visible; white-space: nowrap; }
.pf-cal__grid { display: flex; gap: 3px; }
.pf-cal__week { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }

.pf-day {
  display: block; width: 12px; height: 12px; border-radius: 3px;
  background: var(--navy-100);
}
.pf-day--void { background: transparent; }
.pf-day--1 { background: #bfe3cd; }
.pf-day--2 { background: #79c89b; }
.pf-day--3 { background: #3fa06c; }
.pf-day--4 { background: var(--ok-500); }

.pf-cal__legend {
  display: flex; align-items: center; gap: 4px; margin-top: 14px;
  font-size: .74rem; color: var(--text-muted);
}
.pf-cal__legend span:first-child { margin-inline-end: 4px; }
.pf-cal__legend span:last-child { margin-inline-start: 4px; }

/* ------------------------------------------------------------ Raqamlar */

.pf-stats {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}
.pf-stat {
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface-alt); border: 1px solid var(--border);
  text-align: center;
}
.pf-stat b { display: block; font-size: 1.5rem; font-weight: 800; color: var(--text); }
.pf-stat span {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted);
}

/* ------------------------------------------------------- Reyting grafigi */

.pf-chart { position: relative; }
.pf-chart svg { width: 100%; height: 190px; display: block; overflow: visible; }
.pf-chart__area { fill: rgba(240, 90, 40, .12); stroke: none; }
.pf-chart__line {
  fill: none; stroke: var(--accent); stroke-width: 2.5;
  stroke-linejoin: round; stroke-linecap: round;
}
.pf-chart__dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.pf-chart__scale {
  position: absolute; inset: 0 auto 0 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 18px 0; font-size: .7rem; color: var(--text-faint);
  pointer-events: none;
}

/* ------------------------------------------------------------- Ustunlar */

.pf-cols {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pf-bars { display: grid; gap: 12px; }
.pf-bar__top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; font-size: .84rem; margin-bottom: 5px;
}
.pf-bar__top span { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-bar__top b { color: var(--text-muted); font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.pf-bar__track {
  height: 8px; border-radius: 999px; background: var(--navy-100); overflow: hidden;
}
.pf-bar__track i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.pf-bar__track .pf-bar--alt { background: var(--navy-500); }

/* ------------------------------------------------- Yechilganlar diagrammalari
 * `contest/_solved_charts.html`. Ranglar tekshirilgan (rang ko‘rlikda ham
 * ajraladi, oq va #132635 fonda); qorong‘i rejim o‘z pog‘onalari bilan,
 * avtomatik teskari emas. «Boshqa» — betaraf kulrang.
 */
.sc {
  --sc-bar: #2a78d6;
  --sc-s1: #2a78d6; --sc-s2: #eb6834; --sc-s3: #1baf7a; --sc-s4: #eda100;
  --sc-s5: #e87ba4; --sc-s6: #008300; --sc-s7: #4a3aa7; --sc-s0: #a3aebb;
  --sc-grid: color-mix(in srgb, var(--text-muted) 16%, transparent);
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}
[data-bs-theme="dark"] .sc {
  --sc-bar: #3987e5;
  --sc-s1: #3987e5; --sc-s2: #d95926; --sc-s3: #199e70; --sc-s4: #c98500;
  --sc-s5: #d55181; --sc-s6: #008300; --sc-s7: #9085e9; --sc-s0: #5b6f81;
}

.sc-card {
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px 16px; min-width: 0;
  container-type: inline-size;           /* tor kartochkada halqa va ro‘yxat ustma-ust */
}
.sc-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sc-card__title {
  margin: 0; font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted);
}
.sc-card__sub { font-size: .8rem; color: var(--text-faint); }

/* Ustunlar: chapda o‘q, o‘rtada maydon, pastda nomlar */
.sc-bars {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 200px auto;
  column-gap: 8px; row-gap: 8px;
}
.sc-bars__axis { position: relative; min-width: 1.6em; font-size: .7rem; color: var(--text-faint); text-align: end; }
.sc-bars__axis span { position: absolute; inset-inline-end: 0; line-height: 1; font-variant-numeric: tabular-nums; }
.sc-bars__plot {
  position: relative; display: flex; align-items: flex-end; gap: 6px;
  border-bottom: 1px solid var(--border); padding: 0 4px;
}
.sc-bars__grid { position: absolute; inset-inline: 0; height: 1px; background: var(--sc-grid); pointer-events: none; }
.sc-col {
  position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end;
  justify-content: center; border-radius: 6px 6px 0 0; outline: none; cursor: default;
}
.sc-col:hover, .sc-col:focus-visible { background: color-mix(in srgb, var(--sc-bar) 8%, transparent); }
.sc-col__bar {
  position: relative; width: min(100%, 46px); min-height: 2px;
  background: var(--sc-bar); border-radius: 4px 4px 0 0;
  transition: filter .15s ease;
}
.sc-col:hover .sc-col__bar, .sc-col:focus-visible .sc-col__bar { filter: brightness(1.12); }
.sc-col__val {
  position: absolute; bottom: 100%; inset-inline: -10px; margin-bottom: 4px;
  text-align: center; font-size: .78rem; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.sc-bars__labels { grid-column: 2; display: flex; gap: 6px; padding: 0 4px; }
.sc-bars__labels span {
  flex: 1 1 0; min-width: 0; text-align: center; font-size: .72rem; line-height: 1.25;
  color: var(--text-muted); overflow-wrap: normal;   /* faqat bo‘sh joydan bo‘linadi, so‘z o‘rtasidan emas */
}
.sc-bars__labels i { font-style: normal; }
/* Tor kartochkada nomlar so‘z o‘rtasidan bo‘linmasin — qiya yoziladi */
@container (max-width: 420px) {
  .sc-bars__plot, .sc-bars__labels { gap: 3px; padding: 0 2px; }
  .sc-bars__labels { height: 74px; }
  .sc-bars__labels span {
    position: relative; overflow: visible; white-space: nowrap; font-size: .68rem;
  }
  .sc-bars__labels span > i {
    position: absolute; top: 2px; right: 50%; font-style: normal;
    transform: rotate(-40deg); transform-origin: 100% 0;
  }
}

/* Halqa va ro‘yxat */
.sc-topics { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); gap: 20px; align-items: center; }
@container (max-width: 440px) {
  .sc-topics { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .sc-donut { width: min(190px, 70%); }
  .sc-legend { max-height: none; }
}
.sc-donut { position: relative; width: 100%; max-width: 190px; aspect-ratio: 1; }
.sc-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.sc-donut__seg {
  fill: none; stroke-width: 6; cursor: default;
  transition: stroke-width .15s ease, opacity .15s ease;
}
.sc-donut__seg.is-on { stroke-width: 7.6; }
.sc-topics.is-focus .sc-donut__seg:not(.is-on) { opacity: .35; }
.sc-donut__center {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none;
}
.sc-donut__center b { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.sc-donut__center span { margin-top: 4px; font-size: .74rem; color: var(--text-muted); }

.sc-legend {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 2px;
  max-height: 284px; overflow-y: auto; min-width: 0; width: 100%;
}
.sc-legend__item {
  display: grid; grid-template-columns: 10px 1fr auto 3.2em; align-items: center; gap: 10px;
  padding: 5px 8px; border-radius: 8px; font-size: .84rem; outline: none;
}
.sc-legend__item:hover, .sc-legend__item:focus-visible, .sc-legend__item.is-on { background: color-mix(in srgb, var(--text-muted) 10%, transparent); }
.sc-topics.is-focus .sc-legend__item:not(.is-on) { opacity: .55; }
.sc-legend__dot { width: 10px; height: 10px; border-radius: 3px; }
.sc-legend__name { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-legend__num { color: var(--text); font-variant-numeric: tabular-nums; }
.sc-legend__pct { color: var(--text-faint); font-size: .76rem; text-align: end; font-variant-numeric: tabular-nums; }

.sc-s1 { stroke: var(--sc-s1); background: var(--sc-s1); }
.sc-s2 { stroke: var(--sc-s2); background: var(--sc-s2); }
.sc-s3 { stroke: var(--sc-s3); background: var(--sc-s3); }
.sc-s4 { stroke: var(--sc-s4); background: var(--sc-s4); }
.sc-s5 { stroke: var(--sc-s5); background: var(--sc-s5); }
.sc-s6 { stroke: var(--sc-s6); background: var(--sc-s6); }
.sc-s7 { stroke: var(--sc-s7); background: var(--sc-s7); }
.sc-s0 { stroke: var(--sc-s0); background: var(--sc-s0); }
.sc-donut__seg.sc-s1, .sc-donut__seg.sc-s2, .sc-donut__seg.sc-s3, .sc-donut__seg.sc-s4,
.sc-donut__seg.sc-s5, .sc-donut__seg.sc-s6, .sc-donut__seg.sc-s7, .sc-donut__seg.sc-s0 { background: none; }

/* Kursor izohi */
.sc-tip {
  position: fixed; z-index: 1080; pointer-events: none; max-width: 240px;
  padding: 8px 11px; border-radius: 10px; font-size: .8rem; line-height: 1.35;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(10, 25, 41, .18); opacity: 0; transition: opacity .1s ease;
}
.sc-tip.is-on { opacity: 1; }
.sc-tip b { display: block; font-weight: 700; }
.sc-tip span { color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Chiplar */

.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 7px 14px; border-radius: 999px;
  background: var(--ok-bg); border: 1px solid transparent;
  color: var(--text); text-decoration: none; font-size: .83rem;
}
/* Kod yashil fonda turadi, shuning uchun rangi rejimga qarab almashadi:
   `--ok-500` quyuq fonda o'z foniga juda yaqin (kontrast 2,7). */
.pf-chip b { color: #1a6b43; font-weight: 700; flex-shrink: 0; }
[data-bs-theme="dark"] .pf-chip b { color: #7fd0a4; }
.pf-chip:hover { border-color: var(--ok-500); color: var(--text); }

/* -------------------------------------------------------------- Telefon */

@media (max-width: 720px) {
  .pf-hero { padding: 18px 0 26px; }
  .pf-hero__row { align-items: flex-start; }
  .pf-id { gap: 16px; }
  .pf-avatar { width: 84px; height: 84px; font-size: 1.7rem; }
  .pf-key { width: 100%; }
  .pf-key__item { flex: 1 1 0; min-width: 0; padding: 10px 8px; }
  .pf-key__item b { font-size: 1.3rem; }
  /* «Boylik» kartasi keng — telefonda alohida qatorga tushadi, ekrandan chiqmaydi */
  .pf-key__item.wl-key { flex-basis: 100%; min-width: 0; }
  .pf-card__head, .pf-card__body { padding-inline: 16px; }
}

/* --------------------------------------------------- Kurs va fan kartochkasi */

.pf-tiles {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.pf-tile {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface-alt); border: 1px solid var(--border);
}
.pf-tile__text { min-width: 0; flex: 1; }
.pf-tile__name {
  display: flex; align-items: center; gap: 9px; margin-bottom: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: .96rem;
}
.pf-tile__name i { color: var(--accent-ink); }
.pf-tile__name:hover { color: var(--accent-ink); }

/* Foiz halqasi: konus gradienti `--p` (0..100) bo'yicha to'ladi.
   Ichidagi doira fon rangida — halqa shu tarzda hosil bo'ladi. */
.pf-ring {
  flex-shrink: 0; position: relative;
  width: 78px; height: 78px; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%),
                             var(--navy-100) 0);
  display: grid; place-items: center;
}
.pf-ring::before {
  content: ""; position: absolute; inset: 8px;
  border-radius: 50%; background: var(--surface-alt);
}
.pf-ring b {
  position: relative; font-size: 1.15rem; font-weight: 800; color: var(--text);
}
.pf-ring b small { font-size: .62rem; font-weight: 700; color: var(--text-muted); }

.pf-facts { margin: 0; display: grid; gap: 5px; }
.pf-facts > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.pf-facts dt {
  font-weight: 500; font-size: .8rem; color: var(--text-muted);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pf-facts dd {
  margin: 0; font-size: .82rem; font-weight: 700; color: var(--text); flex-shrink: 0;
}

/* Imtihon darajasi: halqa o'rniga yozuv — «B2», «Band 6.5», «A+». */
.pf-exam { align-items: flex-start; }
.pf-exam__level {
  flex-shrink: 0; width: 92px; min-height: 78px; padding: 10px 6px;
  border-radius: var(--radius); display: grid; place-content: center; gap: 2px;
  text-align: center; background: var(--accent); color: #fff;
}
.pf-exam__level b { font-size: 1.2rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
/* Uzun daraja («Sertifikatsiz», «B1 dan past») qutiga sig'sin. */
.pf-exam__level.is-long b { font-size: .86rem; }
.pf-exam__level small { font-size: .74rem; font-weight: 700; opacity: .85; }
.pf-exam__level.is-pending { background: var(--navy-100); color: var(--text); }
.pf-exam__note {
  margin: 10px 0 0; font-size: .78rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 7px;
}

/* ------------------------------------------------------------------ Jadval */

/* Jadval tor ekranda o'z ichida suriladi — sahifa surilmasin. */
.pf-table-wrap { overflow-x: auto; }
.pf-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.pf-table th, .pf-table td {
  padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.pf-table th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); font-weight: 700;
}
.pf-table tbody tr:last-child td { border-bottom: none; }
.pf-table td b { font-weight: 800; color: var(--text); }
.pf-table__dim { color: var(--text-muted); }

/* ------------------------------------------------------- Faxriylar doskasi */

.pf-honours { display: grid; gap: 14px; }
.pf-honour {
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface-alt); border: 1px solid var(--border);
}
.pf-honour header {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px;
}
.pf-honour__year { font-weight: 700; font-size: .9rem; color: var(--text); }
/* `--warn-500` quyuq rejimda o'zgarmaydi va quyuq fonda yo'qoladi
   (kontrast 2,8) — shuning uchun rangi rejimga qarab almashadi. */
.pf-honour__score {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: .84rem; font-weight: 700; color: var(--warn-500);
}
[data-bs-theme="dark"] .pf-honour__score { color: #e8b25c; }
.pf-honour ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 5px; }
.pf-honour li { font-size: .88rem; color: var(--text); }

/* O'rin medali — doskadagi kartochkadagidek. */
.pf-place {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  font-size: .8rem; font-weight: 800; color: #3d2c00;
  background: var(--border-firm);
}
.pf-place--1 { background: #f5c445; }
.pf-place--2 { background: #cfd6dd; }
.pf-place--3 { background: #dda46a; }

/* Telefon uchun 2-bosqich qoidalari fayl oxirida: ular o'zgartirayotgan
   qoidalardan keyin turishi kerak, aks holda manba tartibi bo'yicha
   bosib ketiladi. */
@media (max-width: 720px) {
  .pf-tile { gap: 14px; padding: 14px; }
  .pf-ring { width: 64px; height: 64px; }
  .pf-ring::before { inset: 7px; }
  .pf-ring b { font-size: 1rem; }
  .pf-exam__level { width: 78px; min-height: 64px; }
  .pf-table th, .pf-table td { padding: 9px 12px; }
}

/* ------------------------------------------------- Sahifa foni (Pro) */
/* Rasm ekranga mahkamlangan (`position: fixed` — iOS'da `background-attachment`
 * ishlamaydi), sahifa uning ustida aylanadi. Ustida qoraytiruvchi parda yo'q —
 * rasm tiniq ko'rinadi; kartalar va ichki bloklar shaffof shisha, matn oq.
 * Ranglar o'zgaruvchilar orqali almashtiriladi — har blokni alohida yozmaslik uchun. */
/* `clip-path` — mahkamlangan rasm faqat profil qismida ko'rinadi: sahifaning
 * boshqa qismlarini («Orqaga» qatori, pastki qism) yopib qo'ymaydi. */
.pf--page {
  position: relative; isolation: isolate; background: transparent; clip-path: inset(0);
  --text: #fff; --text-muted: rgba(255, 255, 255, .78);
  --surface: rgba(10, 14, 28, .26); --surface-alt: rgba(255, 255, 255, .07);
  --border: rgba(255, 255, 255, .2); --navy-100: rgba(255, 255, 255, .14);
  --accent-ink: #ffb38a; --shadow-sm: none;
}
.pf-page-bg {
  position: fixed; inset: 0; z-index: -1;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.pf--page .pf-hero {
  background: none;
  padding-top: clamp(90px, 24vh, 260px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7), 0 2px 16px rgba(0, 0, 0, .45);
}
/* Gradientli ism (`background-clip: text`, harf ichi shaffof): `text-shadow` harf orqali
   ko'rinib ismni xiralashtirardi — soya o'rniga harf chetidan tushadigan `drop-shadow`. */
.pf--page [class*="dz-name--"]:not(.dz-name--neon) {
  text-shadow: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .55)) drop-shadow(0 3px 10px rgba(0, 0, 0, .35));
}
.pf--page .pf-hero .pro-badge { text-shadow: none; }
.pf--page .pf-card {
  background: var(--surface);
  -webkit-backdrop-filter: blur(6px) saturate(130%); backdrop-filter: blur(6px) saturate(130%);
  border-color: var(--border);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.pf--page .pf-card__head { background: transparent; }
.pf--page .pf-key__item { background: rgba(10, 14, 28, .22); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
/* Ichki panellar: olimpiada faolligi va reyting grafigi (o'z ranglari bor) */
.pf--page .ay, .pf--page .rc {
  --ay-card: transparent; --ay-line: rgba(255, 255, 255, .18); --ay-ink: #fff; --ay-muted: rgba(255, 255, 255, .75);
  --ay-0: rgba(255, 255, 255, .13);
  --rc-card: transparent; --rc-plot: rgba(255, 255, 255, .05); --rc-line: rgba(255, 255, 255, .16);
  --rc-ink: #fff; --rc-muted: rgba(255, 255, 255, .75);
}
@media (prefers-reduced-transparency: reduce) {
  .pf--page .pf-card { background: rgba(10, 14, 28, .82); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* DTM «Tarix»: har o'quv yili — yig'ilgan papka */
.pf-dtm-year { border: 1px solid var(--border); border-radius: 12px; margin-top: 10px; }
.pf-dtm-year > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pf-dtm-year > summary small { color: var(--text-faint); font-weight: 600; margin-left: auto; }
.pf-dtm-year[open] > summary .fa-folder::before { content: "\f07c"; }
.pf-dtm-year .pf-table-wrap { border-top: 1px solid var(--border); }
