/* borsamorsa.com — temel stiller */
:root {
  --bg: #FFFFFF; --surface: #F5F6F8; --surface2: #ECEEF2;
  --text: #0F1115; --muted: #5C6572; --border: #E4E7EC;
  --accent: #1F4FD8; --accent-ink: #FFFFFF;
  --up: #137A4C; --down: #C2362B; --adbg: #F7F8FA;
}
:root[data-theme="dark"] {
  --bg: #0B0D10; --surface: #14171C; --surface2: #1C2027;
  --text: #F2F4F7; --muted: #9AA3AF; --border: #242932;
  --accent: #7C9CFF; --accent-ink: #0B0D10;
  --up: #34D399; --down: #F87171; --adbg: #0F1216;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
.serif { font-family: "Source Serif 4", Georgia, serif; font-weight: 600; letter-spacing: -0.015em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.sr { position: absolute; left: -9999px; }

/* Üst menü */
.hdr { display: flex; align-items: center; gap: 16px; height: 64px; border-bottom: 1px solid var(--border); padding: 0 20px; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.logo b { color: var(--accent); font-weight: 700; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); padding: 8px 12px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a:hover { background: var(--surface); }
.hdr-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
@media (max-width: 760px) {
  .hdr { height: auto; padding: 10px 16px; row-gap: 4px; }
  .logo { order: 1; } .hdr-right { order: 2; } .nav { order: 3; width: 100%; }
  .nav a { min-height: 40px; padding: 6px 10px; }
}
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface); }
.seg button { border: 0; font: inherit; font-size: 13px; font-weight: 600; height: 32px; padding: 0 12px; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.iconbtn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.iconbtn svg { width: 18px; height: 18px; }
:root[data-theme="dark"] .ico-moon { display: none; }
:root:not([data-theme="dark"]) .ico-sun { display: none; }

/* Reklam alanları — tek üst banner, tek tablo içi */
.ad { display: flex; justify-content: center; padding: 14px 20px; background: var(--adbg); border-bottom: 1px solid var(--border); }
.ad-slot { width: 728px; max-width: 100%; height: 90px; border: 1px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
@media (max-width: 760px) { .ad-slot { width: 320px; height: 50px; } }

/* Ana sayfa */
.hero { padding: 44px 0 24px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; justify-content: space-between; }
.hero h1 { font-size: clamp(30px, 4.5vw, 46px); line-height: 1.08; }
.hero p { margin: 12px 0 0; font-size: 17px; color: var(--muted); max-width: 620px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; min-width: 150px; }
.stat span:first-child { font-size: 12px; color: var(--muted); }
.stat span:last-child { font-size: 20px; font-weight: 600; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; border: 1px solid var(--border); border-radius: 999px; width: fit-content; max-width: 100%; margin: 0 0 20px; }
.tabs button { border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); padding: 0 14px; height: 40px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.tabs button:disabled { cursor: default; opacity: 0.55; }

.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.02em; text-transform: uppercase; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 14px 16px; font-size: 15px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; }
.co { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.co:hover .nm { color: var(--accent); }
.av { width: 36px; height: 36px; border-radius: 999px; background: var(--surface2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.nm { font-weight: 600; display: block; }
.code { font-size: 12px; color: var(--muted); display: block; }
.pd { font-weight: 600; }
.pd2 { color: var(--muted); }
.pdm { display: none; font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  table { min-width: 0; }
  .sektor, .sec { display: none; }
  .pdm { display: block; }
  td, th { padding-left: 10px; padding-right: 10px; font-size: 14px; }
  td:first-child, th:first-child { width: 28px; padding-right: 0; }
  .av { width: 30px; height: 30px; font-size: 11px; }
  .co { gap: 8px; }
  .nm { white-space: normal; line-height: 1.25; }
  .stat { flex: 1 1 100px; min-width: 0; padding: 10px 12px; }
  .stat span:last-child { font-size: 17px; }
  .tabs button { height: 36px; font-size: 13px; padding: 0 12px; }
}
.adrow td { padding: 12px 16px; background: var(--adbg); }
.adrow .ad-slot { width: auto; }
.note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* Kartlar */
.section { padding-top: 52px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-h h2 { font-size: 24px; font-weight: 600; }
.section-h a { font-size: 14px; font-weight: 500; color: var(--accent); text-decoration: none; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3 { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: inherit; }
.card.link { background: var(--surface); }
.card.link:hover { border-color: var(--accent); }
.card .l { font-size: 13px; color: var(--muted); }
.card .v { font-size: 26px; font-weight: 600; }
.card .t { font-size: 16px; font-weight: 600; }
.card .d { font-size: 14px; color: var(--muted); }

/* İçerik sayfaları */
.page { max-width: 760px; padding: 40px 20px 64px; margin: 0 auto; }
.page h1 { font-size: clamp(28px, 4vw, 36px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.page .lead { font-size: 17px; color: var(--muted); margin: 12px 0 0; }
.page h2 { font-size: 22px; font-weight: 600; margin-top: 36px; }
.page p, .page li { font-size: 16px; line-height: 1.65; }
.page p { margin: 12px 0 0; }
.crumb { font-size: 13px; color: var(--muted); display: flex; gap: 8px; padding-top: 24px; }
.crumb a { text-decoration: none; }
details { border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-top: 10px; }
summary { font-weight: 600; font-size: 15px; cursor: pointer; }
details p { color: var(--muted); font-size: 15px; margin: 10px 0 0; }

/* Hesaplayıcı */
.calc { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; }
.calc form { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 22px; padding: 26px; border: 1px solid var(--border); border-radius: 18px; }
.calc .res-col { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.field input { height: 52px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 18px; font-weight: 600; padding: 0 16px; outline: 0; width: 100%; }
.field input:focus { border-color: var(--accent); }
.field .hint { font-size: 13px; color: var(--muted); }
.res { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.res.main { border-color: var(--accent); }
.res .l { font-size: 13px; color: var(--muted); }
.res .v { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.res.main .v { font-size: 44px; }
.res .v.up { color: var(--up); } .res .v.down { color: var(--down); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

/* Alt bilgi */
.ftr { border-top: 1px solid var(--border); margin-top: 64px; padding: 32px 20px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; font-size: 13px; color: var(--muted); }
.ftr .about { display: flex; flex-direction: column; gap: 8px; max-width: 520px; line-height: 1.5; }
.ftr nav { display: flex; gap: 20px; flex-wrap: wrap; }
.ftr nav a { text-decoration: none; }
.btn { display: inline-flex; align-items: center; height: 44px; padding: 0 22px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--text); background: transparent; cursor: pointer; font-family: inherit; }
.center { display: flex; justify-content: center; padding-top: 20px; }
