/* Fundfy tasarım dili: Inter + açık zemin #f5f7fa + teal-600 (#0d9488) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+20BA, U+2122;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EF9, U+2000-2069;
}

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-2: #f5f7fa;
  --track: #e8edf4;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --ink: #000000;
  --ink-2: #525866;
  --muted: #99a0ae;
  --accent: #0d9488;
  --accent-2: #0f766e;
  --accent-soft: rgba(13, 148, 136, .10);
  --up: #0f766e;
  --down: #b91c1c;
  --warn: #d97706;
  --r: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 15px/1.55 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-weight: 700;
  color: var(--ink);
}

b,
strong {
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- düzen ---------- */
.app {
  display: grid;
  grid-template-columns: 288px 1fr;
  min-height: 100vh;
}

.side {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 14px 0 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.main {
  padding: 14px 18px 40px;
  min-width: 0;
}

header.top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--line);
}

header.top .icon-btn {
  margin-left: auto;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand h1 {
  font-size: 15px;
  margin: 0;
  letter-spacing: -.1px;
}

.brand .sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-2);
  flex: 0 0 auto;
  display: none;
}

.status-dot.live {
  background: var(--up);
}

.status-dot.err {
  background: var(--down);
}

.icon-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--line-2);
}

/* ---------- arama ---------- */
.search {
  position: relative;
  padding: 10px 14px;
}

.search .ico {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  display: none;
}

input[type="search"],
input[type="date"] {
  width: 100%;
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 13.5px;
  font-weight: 500;
  outline: none;
  font-family: inherit;
}

.search input {
  padding-left: 27px;
}

input::placeholder {
  color: var(--muted);
}

input:focus {
  border-color: var(--line-2);
  background: var(--bg);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(.55);
  cursor: pointer;
  opacity: .8;
}

/* PPF / Tümü kapsam düğmeleri */
.scope-toggle {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.scope-toggle button {
  flex: 1;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 0;
  font: 600 12.5px "Inter", sans-serif;
  cursor: pointer;
  transition: all .15s ease;
}

.scope-toggle button:hover {
  color: var(--ink);
  border-color: var(--line-2);
}

.scope-toggle button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* ---------- sol liste ---------- */
.list {
  overflow-y: auto;
  flex: 1;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.list::-webkit-scrollbar {
  width: 6px;
}

.list::-webkit-scrollbar-thumb {
  background: var(--line-2);
}

.grp {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 12px 14px 5px;
}

.grp .n {
  color: var(--line-2);
}

.frow {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  padding: 7px 14px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  font-weight: 550;
  transition: background .12s;
}

.frow:hover {
  background: var(--panel-2);
}

.frow.on {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.frow.on .code {
  color: var(--accent-2);
}

.frow.on .nm {
  color: var(--ink-2);
}

.frow .r1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.frow .code {
  font-weight: 650;
  letter-spacing: .4px;
  font-size: 13.5px;
}

.frow .sz {
  margin-left: auto;
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.frow .nm {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.frow .mg {
  color: var(--muted);
  font-size: 12px;
}

.frow .st {
  color: var(--warn);
  font-size: 10px;
}

.frow .tag {
  color: var(--line-2);
  font-size: 9.5px;
}

.empty {
  padding: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 11.5px;
}

.placeholder {
  padding: 120px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- sağ sütun: grid ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 12px;
}

.stat {
  background: var(--panel);
  padding: 10px 12px;
}

.stat .k {
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.stat .v {
  font-size: 17px;
  font-weight: 700;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.hd {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.hd h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.2px;
  line-height: 1.35;
}

.hd .mgr {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

.pill {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  white-space: nowrap;
  background: rgba(251, 191, 36, .1);
  border: 1px solid rgba(251, 191, 36, .3);
  color: var(--warn);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 10.5px;
}

.pill.ok {
  background: rgba(52, 211, 153, .1);
  border-color: rgba(52, 211, 153, .3);
  color: var(--up);
}

.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.kv .cell {
  background: var(--panel);
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.kv .k {
  color: var(--muted);
  font-size: 10px;
}

.kv .v {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.up {
  color: var(--up);
}

.down {
  color: var(--down);
}

.flat {
  color: var(--muted);
}

h3.sec {
  font-size: 9.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

h3.sec .n {
  font-size: 10.5px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 450;
}


/* ---------- şık zaman çizelgesi ---------- */
.timeline {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 14px 16px 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.tl-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.timeline .brush {
  cursor: grab;
}

.timeline .brush:active {
  cursor: grabbing;
}

.tl-dates {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tl-dates label.date input {
  width: auto;
  min-width: 126px;
  padding: 4px 7px;
  font-size: 11.5px;
}

.tl-dates .presets {
  display: flex;
  gap: 4px;
}

.tl-dates .presets button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 450;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}

.tl-dates .presets button:hover {
  color: var(--ink);
  border-color: var(--line-2);
}

.tl-dates .presets button.on {
  color: var(--ink);
  border-color: var(--accent);
  background: rgba(45, 212, 191, .1);
}

.brush {
  position: relative;
  height: 40px;
  display: grid;
  touch-action: none;
}

/* sürüklenebilirlik ipucu: ilk etkileşime dek görünür */
.brush-hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .1);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 550;
  padding: 3px 11px;
  white-space: nowrap;
  animation: hintIn .5s ease .6s both, hintPulse 2.4s ease-in-out 1.4s 3;
}

.brush-hint.bye {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.92);
  transition: opacity .55s ease, transform .55s ease;
}

@keyframes hintIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(4px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes hintPulse {

  0%,
  100% {
    box-shadow: 0 2px 8px rgba(16, 24, 40, .1);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(13, 148, 136, .14), 0 2px 8px rgba(16, 24, 40, .12);
  }
}

.brush>svg,
.brush>input[type="range"] {
  grid-area: 1 / 1;
}

.brush svg {
  width: 100%;
  height: 40px;
  display: block;
  pointer-events: none;
}

.brush input[type="range"] {
  width: 100%;
  height: 100%;
  margin: 0;
  min-width: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.brush input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  cursor: ew-resize;
  width: 9px;
  height: 40px;
  border-radius: 4px;
  background: #ffffff;
  border: 1.5px solid var(--accent);
  box-shadow: 0 1px 3px rgba(13, 148, 136, .35);
  transition: box-shadow .2s ease, background .2s ease;
}

.brush input[type="range"]:active::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: var(--accent-soft);
}

.brush input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--accent-soft);
}

.brush input[type="range"]::-moz-range-track {
  background: none;
}

.brush input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  cursor: ew-resize;
  width: 9px;
  height: 40px;
  border-radius: 4px;
  background: #ffffff;
  border: 1.5px solid var(--accent);
}

/* ---------- büyük pasta sahnesi ---------- */
.pie-stage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 24px 24px;
}

.pie-stage .seg.mini {
  position: absolute;
  right: 18px;
  top: 18px;
  max-width: 190px;
  flex: none;
}

.pie-stage {
  position: relative;
}

.pie-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 32px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}

.pie-wrap {
  display: contents;
}

svg.pie {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
}

.pie-cap {
  fill: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
}

.pie-big {
  fill: var(--ink);
  font-size: 60px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
}

.pie-sm {
  fill: var(--muted);
  font-size: 13.5px;
  font-weight: 550;
}

.pie-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
  justify-content: center;
}

.pie-list .pl {
  display: grid;
  grid-template-columns: minmax(88px, 150px) 1fr auto 16px;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--ink-2);
  opacity: 0;
  animation: fadeUp .35s ease forwards;
  animation-delay: calc(var(--i, 0) * 40ms);
}

.pie-list .pl .lbl {
  text-align: right;
  line-height: 1.25;
  word-break: break-word;
  font-weight: 550;
}

.pie-list .pl .track {
  height: 22px;
  border-radius: 4px;
  background: var(--track);
  overflow: hidden;
  display: block;
}

.pie-list .pl .fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--c, var(--accent));
  animation: barIn .5s ease forwards;
  animation-delay: calc(var(--i, 0) * 50ms + 100ms);
}

.pie-list .pl .pct {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 46px;
  text-align: left;
}

.pie-list .pl .arr {
  font-size: 11px;
  text-align: center;
}

.pie-list .pl .arr.up {
  color: var(--up);
}

.pie-list .pl .arr.down {
  color: var(--down);
}

.pie-list .pl .arr.flat {
  color: var(--muted);
}

.pie-list .pl.is-liq .lbl,
.pie-list .pl.is-liq .pct {
  color: var(--accent-2);
}

@keyframes barIn {
  from {
    width: 0;
  }
}

.switch {
  position: relative;
  display: inline-flex;
  padding: 3px;
  gap: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 14px;
  width: 220px;
  height: 30px;
}

.switch .opt {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease;
  user-select: none;
}

.switch .opt.on {
  color: var(--accent-2);
}

.switch .knob {
  position: absolute;
  z-index: 0;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}

.switch.avg .knob {
  transform: translateX(0);
}

.switch.last .knob {
  transform: translateX(calc(100% + 0px));
}

.daily {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: baseline;
  background: rgba(16, 185, 129, .09);
  border: 1px solid rgba(16, 185, 129, .3);
  padding: 9px 14px;
  width: auto;
  justify-self: end;
  white-space: nowrap;
}

.daily .k {
  color: #067657;
  font-size: 12.5px;
  font-weight: 600;
}

.daily .v {
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.daily .k2 {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  flex: 1;
}

.pie-arrow {
  font-size: 15px;
  font-weight: 700;
}

.pie-arrow.up {
  fill: var(--up);
}

.pie-arrow.down {
  fill: var(--down);
}

.pie-arrow.flat {
  fill: var(--muted);
}

/* tek satırda üç kutucuk: gelir / bilinen risk / gerçek risk */
.topline {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: stretch;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.cellbox {
  white-space: nowrap;
}

.riskbox {
  display: flex;
  gap: 10px;
}

/* Bilinen / Gerçek risk değeri kutuları */
.risk-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px 14px;
}

.risk-cell .k {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
}

.risk-cell .src {
  color: var(--muted);
  font-size: 11.5px;
}

.risk-cell.known {
  background: rgba(251, 191, 36, .08);
  border-color: rgba(251, 191, 36, .35);
}

.risk-cell.known .k {
  color: #92690a;
}

.risk-cell.real {
  background: var(--accent-soft);
  border-color: rgba(13, 148, 136, .35);
}

.risk-cell.real .k {
  color: var(--accent-2);
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.risk-pill.lo {
  background: rgba(16, 185, 129, .12);
  color: var(--up);
}

.risk-pill.md {
  background: rgba(217, 119, 6, .13);
  color: var(--warn);
}

.risk-pill.hi {
  background: rgba(185, 28, 28, .12);
  color: var(--down);
}

.risk-link {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.risk-link:hover {
  text-decoration: underline;
}

/* ⓘ düğmesi + açıklama balonu */
.risk-info {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid var(--accent-2);
  color: var(--accent-2);
  background: transparent;
  cursor: pointer;
  font: 600 11px/1 "Inter", sans-serif;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 1px;
}

.risk-info:hover {
  background: var(--accent-soft);
}

.risk-cell.expl .risk-info {
  background: var(--accent-2);
  color: #fff;
}

.risk-expl {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: 78vw;
  text-align: left;
  white-space: normal;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .16);
  padding: 14px 16px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  animation: popIn .18s ease;
  transform-origin: top right;
}

.risk-expl b {
  display: block;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 6px;
}

.risk-expl ul {
  margin: 8px 0;
  padding-left: 16px;
}

.risk-expl li {
  margin: 3px 0;
}

.risk-expl .asof {
  color: var(--muted);
  font-size: 11.5px;
  margin: 4px 0 0;
}

.risk-expl .bd-h {
  margin: 10px 0 4px;
  font-weight: 600;
  color: var(--ink);
  font-size: 12px;
}

.risk-expl .bd {
  padding-left: 16px;
  margin: 0;
}

.kap-stage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  animation: popIn .3s ease;
  transform-origin: 50% 50%;
}

.kap .kap-stage+.kap-stage {
  display: none;
}

.kap-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.kap-head .k {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  flex: 1;
}

.kap-head .pill {
  font-size: 10.5px;
  padding: 3px 10px;
}

.kap-err {
  color: var(--muted);
  font-size: 12.5px;
}

.kap-meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.kap-meta .met {
  color: var(--muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.kap-meta .kap-link {
  color: var(--accent-2);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.kap-meta .kap-link:hover {
  text-decoration: underline;
}

.kap-group {
  border-top: 1px solid var(--line);
}

.kap-gh {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 11px 2px 11px 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.kap-gh:hover .lbl {
  color: var(--accent-2);
}

.kap-gh .chev {
  color: var(--muted);
  font-size: 14px;
  flex: 0 0 auto;
}

.kap-gh .lbl {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  flex: 1;
}

.kap-gh .cnt {
  color: var(--muted);
  font-size: 12px;
}

.kap-rows {
  display: none;
  padding: 0 0 10px;
}

.kap-group.open .kap-rows {
  display: block;
}

.kap-row.kap-cols {
  padding: 2px 0 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  animation: none;
}

.kap-row.kap-cols span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.kap-row {
  display: grid;
  grid-template-columns: 1fr 88px 66px 70px 70px;
  gap: 12px;
  align-items: baseline;
  padding: 3px 0;
  font-size: 13.5px;
  animation: fadeUp .35s ease both;
  animation-delay: calc(var(--i, 0) * 40ms);
}

.kap-row .c1 {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kap-row .c2,
.kap-row .c4 {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 12.5px;
}

.kap-row .c3 {
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 650;
}

.kap-row .c5 {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 600;
}

.kap-more {
  display: none;
}

.kap-more {
  color: var(--muted);
  font-size: 11px;
  padding-top: 4px;
}

/* animasyonlar */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(.965);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.pie-wrap.enter {
  animation: popIn .28s ease;
  transform-origin: 50% 50%;
}

.pie-stage svg.pie path {
  transition: opacity .12s ease;
  cursor: pointer;
}

.pie-stage svg.pie path:hover {
  opacity: .82;
}

@media (max-width: 760px) {
  .pie-main {
    grid-template-columns: 1fr;
  }

  .pie-stage .seg.mini {
    position: static;
    margin-bottom: 12px;
  }

  /* timeline: mobilde etiketler ve tarih alanları sığsın */
  .tl-labels {
    font-size: 10px;
  }

  .tl-dates {
    gap: 6px;
  }

  .tl-dates label.date input {
    min-width: 112px;
    font-size: 11px;
  }

  /* yatay çubuk listesi */
  .pie-list {
    gap: 8px;
  }

  .pie-list .pl {
    grid-template-columns: minmax(84px, 118px) 1fr auto 14px;
    gap: 8px;
    font-size: 13px;
  }

  .pie-list .pl .track {
    height: 18px;
  }

  .pie-list .pl .pct {
    min-width: 46px;
    font-size: 12.5px;
  }

  /* KAP satırları: 5 sütun dar ekranda taşmasın */
  .kap-row {
    grid-template-columns: minmax(0, 1fr) 62px 42px 56px 48px;
    gap: 6px;
    font-size: 12.5px;
  }

  .kap-row .c2,
  .kap-row .c4 {
    font-size: 11.5px;
  }

  .kap-row.kap-cols span {
    font-size: 10px;
    letter-spacing: .3px;
    width: max-content;
  }

  .kap-gh .cnt {
    font-size: 11px;
  }

  .kap-expl,
  .risk-expl {
    max-width: 88vw;
  }
}

@media (max-width: 700px) {

  /* gelir + risk kutuları alt alta, tam genişlik */
  .topline {
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    width: 100%;
  }

  .daily {
    justify-self: stretch;
    white-space: normal;
    min-width: 0;
    grid-template-columns: auto 1fr;
    row-gap: 2px;
  }

  .daily .k2 {
    grid-column: 1 / -1;
    text-align: left;
  }

  .riskbox {
    justify-content: stretch;
    flex-wrap: wrap;
    min-width: 0;
  }

  .risk-cell {
    flex: 1 1 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .risk-cell .src {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .risk-expl {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }

  /* tarih seçiciler üst satır, presets alt satır */
  .tl-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .tl-dates label.date {
    grid-row: 1;
  }

  .tl-dates label.date input {
    width: 100%;
    min-width: 0;
  }

  .tl-dates .presets {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
  }

  .pie-stage {
    padding: 14px 12px 16px;
  }

  .main {
    padding: 10px 10px 30px;
  }
}

footer {
  margin-top: 20px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

footer b {
  color: var(--ink-2);
  font-weight: 400;
}

footer code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
}

/* ---------- reklam alanları (AdSense yer tutucuları) ---------- */
.ad-slot {
  position: relative;
  margin: 14px 0 0;
  width: 100%;
  min-height: 110px;
}

.ad-slot .lbl {
  position: absolute;
  top: -7px;
  left: 6px;
  z-index: 1;
  font-size: 9px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  padding: 0 5px;
  line-height: 1;
}

.ad-slot ins {
  min-height: 104px;
  border-radius: 4px;
  width: 100%;
}

.ad-slot.ad-top {
  margin-top: 0;
}

/* AdSense gerçek dolguda çerçeveyi kaldır */
.ad-slot ins.adsbygoogle:empty {
  border: 1px dashed var(--line-2);
}

.ad-slot ins.adsbygoogle:not(:empty) {
  border: 0;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .side {
    position: static;
    height: auto;
  }

  .list {
    max-height: 34vh;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .main {
    padding: 12px 12px 32px;
  }
}
/* SEO giriş metni (sunucu doldurur, JS günceller) */
.intro {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  max-width: 980px;
}
.intro b { color: var(--ink-2); font-weight: 600; }
