/* Pairo Base: proje nabız panosu (PairoDial). Tüm sınıflar pd- önekli.
   Renkler yalnızca style.css jetonlarından; gölge yok, degrade yok.
   Hareket: 160 / 240 / 400 ms, yalnızca ease-out; azaltılmış harekette kapalı. */

.pd-pulse { container-type: inline-size; font-family: var(--font); color: var(--text); min-width: 0; }
.pd-pulse *, .pd-pulse *::before, .pd-pulse *::after { box-sizing: border-box; }

/* ── düzen: geniş 3 sütun, ≤1100 kadran solda + iki kart sağda üst üste, ≤820 kadran üstte, ≤720 tek sütun ── */
.pd-grid { display: grid; gap: 16px; align-items: stretch;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.9fr) minmax(280px, 1.1fr); }
@container (max-width: 1100px) {
  .pd-grid { grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr); }
  .pd-stage { grid-row: span 2; order: -1; align-self: start; }
}
@container (max-width: 820px) {
  .pd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-stage { grid-column: 1 / -1; grid-row: auto; align-self: stretch; }
}
@container (max-width: 720px) {
  .pd-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── kartlar ── */
.pd-card { background: var(--surface); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; min-width: 0; }
@container (max-width: 720px) { .pd-card { padding: 16px; } }
.pd-eyebrow { font-size: 13px; line-height: 17px; font-weight: 500; color: var(--text-3); }
.pd-head { margin: 0; font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 22px; letter-spacing: -.02em; color: var(--text); }
.pd-eyebrow + .pd-head { margin-top: 4px; }

/* özet */
.pd-fig { margin-top: 16px; font-family: var(--display); font-weight: 800; font-size: 64px; line-height: 1; letter-spacing: -.045em;
  font-variant-numeric: tabular-nums; color: var(--text); }
.pd-delta { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; padding: 4px 8px;
  border-radius: var(--r-xs); font-size: 13px; line-height: 16px; font-weight: 600; }
.pd-delta svg { width: 14px; height: 14px; flex: none; }
.pd-delta.is-up { background: var(--sage-bg); color: var(--sage-fg); }
.pd-delta.is-down { background: var(--danger-soft); color: var(--danger); }
.pd-delta.is-flat { background: var(--surface-3); color: var(--text-2); }
.pd-sub { margin: 8px 0 0; font-size: 13px; line-height: 18px; color: var(--text-3); }

.pd-spark { margin-top: 24px; }
.pd-spark-plot { position: relative; height: 64px; cursor: crosshair; }
.pd-spark-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pd-spark-svg path, .pd-spark-svg line { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.pd-spark-base { stroke: var(--line); stroke-width: 1; }
.pd-spark-act { stroke: var(--accent); stroke-width: 2; }
.pd-spark-ideal { stroke: var(--text-4); stroke-width: 1.5; stroke-dasharray: 4 4; stroke-linecap: butt; }
.pd-spark-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); pointer-events: none; }
.pd-spark-dot.is-ideal { background: var(--text-4); }
.pd-spark-guide { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: var(--line-2); pointer-events: none; }
.pd-spark-leg { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--text-3); }
.pd-leg { display: inline-flex; align-items: center; gap: 6px; }
.pd-leg b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-leg i { width: 16px; height: 0; border-top: 2px solid var(--accent); }
.pd-leg.is-ideal i { border-top: 2px dashed var(--text-4); }

.pd-rbars { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.pd-rbar-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 17px; }
.pd-rbar-l { color: var(--text-2); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-rbar-r { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.pd-rbar-r b { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.pd-rbar-v { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.pd-track { margin-top: 8px; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pd-track i { display: block; height: 100%; border-radius: 999px; background: var(--pd-bar, var(--accent)); transition: width 400ms var(--ease); }
.pd-b-forest { --pd-bar: var(--accent); }
.pd-b-plum { --pd-bar: var(--violet); }
.pd-b-sea { --pd-bar: var(--success); }
.pd-b-gold { --pd-bar: var(--warning); }
.pd-b-danger { --pd-bar: var(--danger); }
.pd-sum-foot { margin-top: auto; padding-top: 24px; }
.pd-btn { width: 100%; }

/* ── kadran ── */
.pd-stage { background: var(--surface); border-radius: var(--r-xl); padding: 24px; display: grid; place-items: center; min-width: 0; }
@container (max-width: 720px) { .pd-stage { padding: 8px; } }
.pd-dial { container: pd-dial / inline-size; position: relative; width: 100%; max-width: 620px; aspect-ratio: 1; }
.pd-dial-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* dilim tonları: sakin marka tonları, metin eşleşen fg jetonunda */
.pd-t-sage { --pd-bg: var(--sage-bg); --pd-fg: var(--sage-fg); }
.pd-t-sea { --pd-bg: var(--sea-bg); --pd-fg: var(--sea-fg); }
.pd-t-lilac { --pd-bg: var(--violet-soft); --pd-fg: var(--violet); }
.pd-t-gold { --pd-bg: var(--warning-soft); --pd-fg: var(--gold-fg); }
.pd-t-sunk { --pd-bg: var(--surface-3); --pd-fg: var(--text); }
.pd-t-danger { --pd-bg: var(--danger-soft); --pd-fg: var(--danger); }

.pd-ring { fill: none; stroke: var(--line-2); stroke-width: 2; }
.pd-seg { cursor: pointer; outline: none; transform-box: view-box; transform-origin: 50% 50%;
  transition: translate 160ms var(--ease), scale 160ms var(--ease), opacity 160ms var(--ease); }
.pd-seg path { fill: var(--pd-bg); stroke: transparent; stroke-width: 3; transition: stroke 160ms var(--ease); }
.pd-seg:focus-visible path { stroke: var(--text); }
.pd-seg.is-hot { translate: calc(var(--ux) * 10px) calc(var(--uy) * 10px); }
.pd-seg:active { scale: .98; }
.pd-arc { fill: none; stroke: var(--danger); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.pd-mark { transform-box: fill-box; transform-origin: center; }
.pd-mark circle { fill: var(--danger); stroke: var(--surface); stroke-width: 4; }
.pd-mark path { fill: none; stroke: var(--surface); stroke-width: 2.6; stroke-linecap: round; }

.pd-seg-c { position: absolute; transform: translate(-50%, -50%); width: 27cqw; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: clamp(4px, 1cqw, 8px); text-align: center; color: var(--pd-fg);
  transition: translate 160ms var(--ease), opacity 160ms var(--ease); }
.pd-seg-c.is-hot { translate: calc(var(--ux) * 1.5625cqw) calc(var(--uy) * 1.5625cqw); }
.pd-dial.is-hovering .pd-seg:not(.is-hot), .pd-dial.is-hovering .pd-seg-c:not(.is-hot) { opacity: .4; }
.pd-seg-top { display: inline-flex; align-items: center; gap: clamp(4px, 1cqw, 8px); max-width: 100%;
  font-size: clamp(12px, 2.3cqw, 14px); line-height: 1.2; font-weight: 600; }
.pd-seg-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-ico { flex: none; display: grid; place-items: center; width: clamp(20px, 4.2cqw, 26px); height: clamp(20px, 4.2cqw, 26px);
  border-radius: var(--r-xs); background: var(--surface); color: var(--pd-fg); }
.pd-ico svg { width: 62%; height: 62%; display: block; }
.pd-val { font-family: var(--display); font-weight: 800; font-size: clamp(18px, 5cqw, 32px); line-height: 1; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-loz { display: inline-flex; align-items: center; height: clamp(18px, 3.3cqw, 20px); padding: 0 clamp(6px, 1.3cqw, 8px);
  border-radius: var(--r-xs); font-size: clamp(11px, 1.9cqw, 12px); font-weight: 600; line-height: 1; white-space: nowrap; }
.pd-loz.is-ok { background: var(--surface); color: var(--text-2); }
.pd-loz.is-warn { background: var(--gold-bg); color: var(--gold-fg); }
.pd-loz.is-alert { background: var(--danger); color: var(--surface); }
:root[data-theme="dark"] .pd-loz.is-warn { background: var(--gold-fg); color: var(--surface); }

/* merkez: en acil konu */
.pd-hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 43.4%; aspect-ratio: 1; border-radius: 50%;
  background: var(--primary); color: var(--on-dark); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(4px, 1cqw, 6px); padding: 0 6.5cqw; text-align: center; }
.pd-hub-ico { display: grid; place-items: center; width: clamp(24px, 5cqw, 32px); height: clamp(24px, 5cqw, 32px); border-radius: var(--r-sm);
  background: var(--surface); color: var(--danger); margin-bottom: clamp(0px, .6cqw, 4px); }
.pd-hub.is-warn .pd-hub-ico { color: var(--warning); }
.pd-hub.is-ok .pd-hub-ico { color: var(--success); }
.pd-hub-ico svg { width: 60%; height: 60%; }
.pd-hub-eye { font-size: clamp(12px, 2cqw, 13px); line-height: 1.25; font-weight: 500; color: var(--on-dark-muted); }
.pd-hub-title { font-family: var(--display); font-weight: 700; font-size: clamp(14px, 3.2cqw, 20px); line-height: 1.12; letter-spacing: -.02em;
  color: var(--on-dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd-hub-sub { font-size: 12px; line-height: 1.3; color: var(--on-dark-muted); }
.pd-hub-cta { position: relative; margin-top: clamp(2px, .8cqw, 6px); display: inline-flex; align-items: center; height: clamp(28px, 5cqw, 32px);
  padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--on-dark-line); background: transparent; color: var(--on-dark);
  font-family: var(--font); font-size: clamp(12px, 2cqw, 13px); font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background 160ms var(--ease), scale 160ms var(--ease); }
.pd-hub-cta::after { content: ""; position: absolute; inset: -8px; }
.pd-hub-cta:hover { background: var(--chrome-hover); }
.pd-hub-cta:active { scale: .94; }
.pd-hub-cta:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 2px; box-shadow: none; }
@container pd-dial (max-width: 440px) { .pd-hub-sub { display: none; } }
/* dar kadranda yan dilimlerde simge etiketin üstüne çıkar: etiket kırpılmasın */
@container pd-dial (max-width: 480px) {
  .pd-seg-c.is-side { width: 30cqw; }
  .pd-seg-c.is-side .pd-seg-top { flex-direction: column; gap: 4px; }
}
@container pd-dial (max-width: 340px) { .pd-hub-ico { display: none; } }

/* ── dikkat listesi ── */
.pd-att { outline: none; }
.pd-att-head { display: flex; align-items: center; gap: 8px; }
.pd-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--text); color: var(--surface); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pd-att-sub { margin: 4px 0 12px; font-size: 13px; line-height: 18px; color: var(--text-3); }
.pd-list { list-style: none; margin: 0 -8px; padding: 0; }
.pd-list li + li { border-top: 1px solid var(--line); }
.pd-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; align-items: center; gap: 12px; width: 100%; min-height: 56px;
  padding: 10px 8px; border-radius: var(--r-sm); text-align: left; color: var(--text);
  transition: background 160ms var(--ease), scale 160ms var(--ease); }
.pd-row:hover { background: var(--surface-2); }
.pd-row:active { scale: .98; }
.pd-row:hover .pd-chev { color: var(--text-2); translate: 2px 0; }
.pd-sbox { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); }
.pd-sbox svg { width: 18px; height: 18px; }
.pd-sbox.is-alert { background: var(--danger-soft); color: var(--danger); }
.pd-sbox.is-warn { background: var(--warning-soft); color: var(--warning); }
.pd-sbox.is-ok { background: var(--sea-bg); color: var(--sea-fg); }
.pd-row-t { display: flex; flex-direction: column; min-width: 0; }
.pd-row-t b { font-size: 14px; line-height: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-row-t small { font-size: 12px; line-height: 16px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-chev { color: var(--text-4); display: grid; transition: translate 160ms var(--ease), color 160ms var(--ease); }
.pd-chev svg { width: 16px; height: 16px; }
.pd-empty { margin: 8px 0 0; font-size: 13px; color: var(--text-3); }
.pd-att-foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; color: var(--text-3); }
.pd-live { width: 8px; height: 8px; border-radius: 50%; background: var(--presence); flex: none; }

/* ── giriş hareketi (yalnızca ilk çizimde) ── */
@keyframes pd-grow { from { scale: .55; opacity: 0; } }
@keyframes pd-fade { from { scale: .8; opacity: 0; } }
@keyframes pd-pop { from { scale: .4; opacity: 0; } }
@keyframes pd-hub { from { scale: .85; opacity: 0; } }
@keyframes pd-draw { 0% { stroke-dashoffset: 1; opacity: 0; } 1% { opacity: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes pd-wipe { from { clip-path: inset(-8px 100% -8px 0); } to { clip-path: inset(-8px -8px -8px 0); } }
@keyframes pd-bar { from { width: 0; } }
@keyframes pd-rise { from { translate: 0 8px; opacity: 0; } }
@keyframes pd-ring { from { opacity: 0; } }
@keyframes pd-bump { 50% { scale: 1.14; } }

.pd-enter .pd-ring { animation: pd-ring 400ms var(--ease) backwards; }
.pd-enter .pd-hub { animation: pd-hub 240ms var(--ease) backwards; }
.pd-enter .pd-seg { animation: pd-grow 400ms var(--ease) backwards; animation-delay: calc(120ms + var(--i) * 70ms); }
.pd-enter .pd-seg-c { animation: pd-fade 400ms var(--ease) backwards; animation-delay: calc(200ms + var(--i) * 70ms); }
.pd-enter .pd-arc { animation: pd-draw 400ms var(--ease) backwards; animation-delay: calc(700ms + var(--j) * 120ms); }
.pd-enter .pd-mark { animation: pd-pop 240ms var(--ease) backwards; animation-delay: calc(1000ms + var(--j) * 120ms); }
.pd-enter .pd-spark-plot { animation: pd-wipe 400ms var(--ease) backwards; animation-delay: 240ms; }
.pd-enter .pd-track i { animation: pd-bar 400ms var(--ease) backwards; animation-delay: calc(320ms + var(--i) * 80ms); }
.pd-enter .pd-delta { animation: pd-rise 240ms var(--ease) backwards; animation-delay: 160ms; }
.pd-enter .pd-list li { animation: pd-rise 240ms var(--ease) backwards; animation-delay: calc(240ms + var(--i) * 60ms); }

/* merkezdeki düğmeden sonra liste kısa bir selam verir */
.pd-flash .pd-sbox { animation: pd-bump 240ms var(--ease) backwards; }
.pd-flash li:nth-child(2) .pd-sbox { animation-delay: 60ms; }
.pd-flash li:nth-child(3) .pd-sbox { animation-delay: 120ms; }
.pd-flash li:nth-child(4) .pd-sbox { animation-delay: 180ms; }
.pd-flash li:nth-child(5) .pd-sbox { animation-delay: 240ms; }
.pd-flash li:nth-child(n+6) .pd-sbox { animation-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .pd-pulse *, .pd-pulse *::before, .pd-pulse *::after { animation: none !important; transition: none !important; }
}
