@font-face { font-family: "Outfit"; src: url("fonts/Outfit.ttf"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0d1222; --bg2: #1a2342; --panel: #121a31; --line: #2a3557;
  --gold: #f2b544; --ink: #f4f1ea; --dim: #8d93a8;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: radial-gradient(1200px 900px at 50% 40%, var(--bg2), var(--bg) 70%) fixed, var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
#graph { position: fixed; inset: 0; width: 100vw; height: 100vh; touch-action: none; }

.top { position: fixed; top: 0; left: 0; padding: 20px 20px 0; max-width: 520px; z-index: 2; pointer-events: none; }
.top > * { pointer-events: auto; }
.top { transition: opacity .25s; }
body.panel-open .top { opacity: 0; pointer-events: none; }
body.panel-open .top > * { pointer-events: none; }
.brand { font-family: "Outfit", sans-serif; font-weight: 700; letter-spacing: 8px; color: var(--gold); font-size: 20px; }
.tag { margin: 8px 0 14px; color: var(--dim); font-size: 14px; line-height: 1.45; }
.btn {
  font: inherit; font-weight: 600; font-size: 14px; color: var(--bg); background: var(--gold);
  border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer;
}
.btn:focus-visible, .links button:focus-visible, .close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.legend { position: fixed; left: 20px; bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px 14px; max-width: 60vw;
  font-size: 12px; color: var(--dim); z-index: 2; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 6px; background: var(--c); vertical-align: -1px; }
.legend .open::before { background: transparent; border: 1.5px dashed var(--dim); }
.hint { position: fixed; right: 20px; bottom: 18px; font-size: 12px; color: var(--dim); z-index: 2; }

/* graf */
.link { stroke: var(--line); stroke-width: 2.5; fill: none; }
.link.chain { stroke: rgba(242, 181, 68, .45); }
.link.open { stroke-dasharray: 5 6; stroke: rgba(141, 147, 168, .35); }
.link.hot { stroke: var(--gold); stroke-width: 3.5; }
.node { cursor: pointer; }
.node circle.core { stroke: rgba(255,255,255,.85); stroke-width: 2; }
.node.open circle.core { fill: transparent; stroke: var(--dim); stroke-dasharray: 4 4; }
.node .num { font-family: "Outfit", sans-serif; font-weight: 800; font-size: 15px; fill: var(--bg); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.node .label { font-family: "Outfit", sans-serif; font-weight: 600; font-size: 15px; fill: var(--ink); text-anchor: middle; pointer-events: none;
  paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.node.open .label { fill: var(--dim); font-weight: 500; font-size: 13px; }
.node .halo { fill: none; stroke: var(--gold); stroke-width: 3; opacity: 0; }
.node.active .halo { opacity: 1; }

/* panel: masaüstünde sağda, telefonda alttan çıkan yaprak */
.panel {
  position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 100vw; z-index: 3;
  background: var(--panel); border-left: 1px solid var(--line); padding: 22px 22px 40px;
  overflow-y: auto; transform: translateX(105%); transition: transform .3s ease;
}
.panel.open { transform: none; }
.close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.07); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.kicker { font-size: 12px; letter-spacing: 3px; color: var(--gold); text-transform: uppercase; margin-top: 4px; }
.panel h1 { font-family: "Outfit", sans-serif; font-size: 32px; margin: 6px 48px 14px 0; line-height: 1.1; }
.panel h2 { font-size: 12px; letter-spacing: 3px; color: var(--dim); text-transform: uppercase; margin: 22px 0 8px; font-weight: 600; }
.video-wrap { width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden;
  background: #000; display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 14px; }
.video-wrap video { width: 100%; height: 100%; display: block; }
.text { font-size: 16px; line-height: 1.6; color: #dcd8cf; margin: 18px 0 0; }
.links, .sources { list-style: none; padding: 0; margin: 0; }
.links li { margin: 0 0 8px; }
.links button { width: 100%; text-align: left; font: inherit; color: var(--ink); background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.links button:hover { border-color: var(--gold); }
.links .to { font-family: "Outfit", sans-serif; font-weight: 700; font-size: 16px; }
.links .dir { color: var(--gold); margin-right: 6px; }
.links .hook { display: block; color: var(--dim); font-size: 13px; margin-top: 3px; line-height: 1.4; }
.links .soon { opacity: .6; cursor: default; }
.sources a { color: var(--dim); font-size: 13px; word-break: break-all; }
.sources li { margin-bottom: 6px; }

@media (max-width: 720px) {
  .top { padding: 14px 16px 0; }
  .tag { font-size: 13px; }
  .hint { display: none; }
  .legend { left: 16px; right: 16px; max-width: none; bottom: 14px; }
  .panel {
    top: auto; bottom: 0; width: 100%; height: auto; max-height: 80vh; border-left: 0;
    border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; transform: translateY(105%);
    padding: 18px 16px calc(32px + env(safe-area-inset-bottom));
  }
  .video-wrap { max-width: 240px; }
}
