/* Ana sayfa hero'su · dört sahneli demo (hero-demo.ts). Betiksiz: sahneler alt alta, sekmeler gizli. Betikle (.is-live):
   sekmeli oynatıcı, tek sahne görünür. Hareket yalnızca sahne açılırken satırların girişi; azaltılmış harekette yok.
   Dar ekranda (375 px) yatay kaydırma yok: satırlar sarılır, skor kartı alta iner. */
.hd-wrap { position: relative; z-index: 2; max-width: 960px; margin: 52px auto 0; padding: 0 16px; }
.hd { color: #0F0E1A; }
.hd-top-bar { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
.hd-tabs { flex: 1; max-width: 640px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); }
.hd-tab { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 10px 4px 12px; border: 0; border-radius: 10px; background: transparent; color: #D9D3FA; font: 600 13.5px/1.1 'Quicksand', system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.hd-tab:hover { color: #FFFFFF; }
.hd-tab[aria-selected="true"] { background: rgba(255, 255, 255, 0.15); color: #FFFFFF; }
.hd-tab-n { font: 500 10.5px/1 'Geist Mono', monospace; color: #A99CF5; }
.hd-prog { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.hd-prog::after { content: ""; position: absolute; inset: 0; background: #A99CF5; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.hd-tab[aria-selected="false"] .hd-prog::after { transform: scaleX(0); }
.hd-toggle { flex: none; width: 40px; height: 40px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.06); color: #FFFFFF; font-size: 11px; cursor: pointer; }
.hd-toggle:hover { background: rgba(255, 255, 255, 0.14); }
@media (max-width: 480px) { .hd-tab { flex-direction: column; gap: 3px; font-size: 12px; padding: 8px 2px 11px; } }

.hd-window { overflow: hidden; border-radius: 18px; background: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.4); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.65); text-align: left; }
.hd-panel { padding: 18px 20px 20px; border-top: 1px solid #EEEEF2; }
.hd-panel:first-child { border-top: 0; }
.hd-panel[hidden] { display: none; }
.hd.is-live .hd-panel { border-top: 0; }
.hd-panel-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 14px; }
.hd-panel-t { font: 500 11px/1.3 'Geist Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: #3B2BC4; }
.hd-tag { padding: 3px 8px; border-radius: 6px; background: #E3F7EC; color: #176B3F; font: 500 10.5px/1.4 'Geist Mono', monospace; letter-spacing: .04em; overflow-wrap: anywhere; }
.hd-tag-ill { background: #FFF1D6; color: #8A5A00; }
.hd-cap { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: #5D5C6B; }
.hd-cap a { color: #3B2BC4; font-weight: 700; }
.hd-cap a:hover { color: #4F3CF0; text-decoration: underline; text-underline-offset: 3px; }
.hd-muted { font-size: 12.5px; color: #6B6A7B; }

/* Satırlar ve çipler */
.hd-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hd-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 10px; background: #FAFAFC; border: 1px solid #EEEEF2; font-size: 14px; line-height: 1.35; }
.hd-chip { flex: none; min-width: 66px; padding: 3px 8px; border-radius: 6px; font: 500 10.5px/1.4 'Geist Mono', monospace; letter-spacing: .03em; text-align: center; white-space: nowrap; background: #EEEBFF; color: #3B2BC4; }
.hd-chip[data-s="ok"] { background: #E3F7EC; color: #176B3F; }
.hd-chip[data-s="warn"] { background: #FFF1D6; color: #8A5A00; }
.hd-chip[data-s="bad"] { background: #FFE3E3; color: #A02B2B; }

/* 1 · Tara */
.hd-url { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px; border-radius: 12px; background: #F6F6F8; border: 1px solid #E4E4EA; }
.hd-url-k { font: 500 10.5px/1.3 'Geist Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: #6B6A7B; }
.hd-url-v { font: 500 14px/1.3 'Geist Mono', monospace; color: #0F0E1A; overflow-wrap: anywhere; }
.hd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 176px; gap: 14px; margin-top: 12px; }
@media (max-width: 600px) { .hd-grid { grid-template-columns: minmax(0, 1fr); } }
.hd-score { display: grid; align-content: center; justify-items: center; gap: 2px; padding: 16px 12px; border-radius: 16px; background: linear-gradient(160deg, #F8F7FF, #EEEBFF); border: 1px solid #E7E3FF; text-align: center; }
.hd-score b { font-size: 46px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hd-score small { font: 500 12px/1 'Geist Mono', monospace; color: #6B6A7B; }
.hd-score span { margin-top: 8px; font-weight: 700; color: #3B2BC4; }
.hd-score em { font-style: normal; font-size: 12px; color: #6B6A7B; }

/* 2 · Simüle et */
.hd-stages { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-st { padding: 5px 10px; border-radius: 999px; font: 500 11.5px/1.3 'Geist Mono', monospace; background: #F0F0F4; color: #5D5C6B; }
.hd-st.ok { background: #E3F7EC; color: #176B3F; }
.hd-st.ok::before { content: "✓ "; }
.hd-st.bad { background: #FFE3E3; color: #A02B2B; }
.hd-st.bad::before { content: "✕ "; }
.hd-lines { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.hd-line { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; background: #FFFFFF; border: 1px solid #E7E3FF; font-size: 14px; line-height: 1.4; }
.hd-line.end { border-color: #F5C2C2; background: #FFF7F7; }
.hd-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #EEEBFF; color: #3B2BC4; font: 500 11px/1 'Geist Mono', monospace; }
.hd-lang { padding: 1px 7px; border-radius: 6px; background: #E3F7EC; color: #176B3F; font: 500 10.5px/1.5 'Geist Mono', monospace; }
.hd-lang.off { background: #FFE3E3; color: #A02B2B; }

/* 3 · Görünürlük */
.hd-q { margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; background: #F6F6F8; border: 1px solid #E4E4EA; font-size: 15px; font-weight: 600; }
.hd-rows-vis .hd-row { justify-content: space-between; }

/* 4 · Görev */
.hd-card { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: #F8F7FF; border: 1px solid #E7E3FF; }
.hd-card-k { font: 500 10.5px/1.3 'Geist Mono', monospace; letter-spacing: .1em; color: #3B2BC4; }
.hd-card b { font-size: 16px; line-height: 1.35; }
.hd-card-m { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-top { display: grid; gap: 8px; margin-top: 12px; font-size: 15px; }
.hd-bar { position: relative; height: 10px; border-radius: 6px; background: #EEEEF2; overflow: hidden; }
.hd-bar i { position: absolute; top: 0; bottom: 0; left: 0; background: #5B47F5; }
.hd-bar i.hd-bar-up { background: repeating-linear-gradient(45deg, #2EBE78 0 6px, #67D6A0 6px 12px); transform-origin: 0 50%; }

/* Kaynak satırı (koyu zemin) */
.hd .src-line { margin: 12px 0 0; text-align: center; font: 500 12px/1.5 'Geist Mono', monospace; letter-spacing: .02em; color: #B9AEFF; }
.hd .src-line a { color: #E4DEFF; text-decoration: underline; text-underline-offset: 3px; }

/* Sahne girişi: yalnızca oynatıcı modunda ve hareket serbestken */
@media (prefers-reduced-motion: no-preference) {
  .hd.is-live .hd-panel.is-on .hd-row, .hd.is-live .hd-panel.is-on .hd-line, .hd.is-live .hd-panel.is-on .hd-st, .hd.is-live .hd-panel.is-on .hd-card, .hd.is-live .hd-panel.is-on .hd-score { animation: hdIn .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 140ms + 120ms); }
  .hd.is-live .hd-panel.is-on .hd-score { animation-delay: 700ms; }
  .hd.is-live .hd-panel.is-on .hd-bar-up { animation: hdGrow .9s cubic-bezier(.2, .7, .2, 1) .6s both; }
}
@keyframes hdIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes hdGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
