/* Inter, self-hosted. Two subsets, split the way Google's subsetter splits
   them: `latin` carries ASCII and the Turkish dotless i, `latin-ext` carries
   the rest of what Turkish needs -- g-breve, s-cedilla, dotted capital I --
   and the lira sign. A Turkish page uses both, so both load; the
   unicode-range split still matters for the English page at /en, which needs
   only the first.

   Self-hosted rather than linked from a font CDN: the CSP here is
   `default-src 'self'`, every visitor to a finance site would otherwise be
   announced to a third party on every page view, and a blocked CDN would
   take the typography down with it. Licence: SIL OFL 1.1, see
   static/fonts/LICENSE.txt.

   The file names carry no version, and static assets are served with a
   day-long cache: replacing Inter means renaming these files, not
   overwriting them. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/static/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/static/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-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --fg: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-fg: #ffffff;
  --up: #16a34a;
  --down: #dc2626;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-2: #1e293b;
    --fg: #e5e7eb;
    --muted: #94a3b8;
    --line: #334155;
    --accent: #60a5fa;
    --accent-fg: #0f172a;
    --up: #4ade80;
    --down: #f87171;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* The variable font carries every weight the site asks for, so the browser
     must never synthesise one: a faux-bold Inter next to a real one is the
     kind of difference you see without being able to name. */
  font-synthesis: none;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0.4em 0 0.3em; }
h1 small { display: block; font-size: 1rem; font-weight: 500; color: var(--muted); margin-top: 4px; }
h2 { font-size: 1.2rem; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.05rem; margin: 0 0 0.3em; }
p { margin: 0.5em 0; }
.lead { font-size: 1.05rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.sym { color: var(--muted); font-size: 0.8em; margin-left: 4px; }
code { background: var(--bg-2); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--fg); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 6px 10px; border-radius: 6px; color: var(--fg); white-space: nowrap; }
.nav a:hover { background: var(--bg-2); text-decoration: none; }
.nav a.active { background: var(--bg-2); font-weight: 600; }
.btn {
  display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--fg); font-weight: 600; white-space: nowrap; cursor: pointer; font-size: 0.95rem;
}
.btn:hover { text-decoration: none; filter: brightness(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.top .btn-primary { display: none; }
@media (min-width: 720px) { .top .btn-primary { display: inline-block; } }

/* layout blocks */
main { padding-bottom: 32px; }
.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 2.1rem; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 16px 0; }
.grid-3 { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 20px 0; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--bg); margin: 16px 0; }
.box h2 { margin-top: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--fg); background: var(--bg); }
.card:hover { text-decoration: none; border-color: var(--accent); }
.card p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin: 14px 0 4px; }
.crumbs .sep { margin: 0 6px; }
.chips { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; }

/* price */
.hero-price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 6px 0 0; }
.price { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.chg { font-size: 1.2rem; font-weight: 600; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }
.ext { color: var(--muted); }
.ext strong { color: var(--fg); }
.flash { animation: flash 0.8s ease-out; }
@keyframes flash { from { background: color-mix(in srgb, var(--accent) 25%, transparent); } to { background: transparent; } }

/* tables */
table.quotes { width: 100%; border-collapse: collapse; margin: 8px 0; font-variant-numeric: tabular-nums; }
table.quotes th, table.quotes td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.quotes th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
table.quotes td.num, table.quotes th.num { text-align: right; white-space: nowrap; }
table.quotes tbody tr:hover { background: var(--bg-2); }
table.quotes.compact td { padding: 6px 8px; }
table.funds td, table.funds th { padding: 7px 6px; font-size: 0.92rem; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* chart */
.chart { width: 100%; height: 220px; display: block; }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.faq p { color: var(--muted); margin: 4px 0 10px; }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg a { padding: 6px 10px; color: var(--fg); font-size: 0.9rem; border-right: 1px solid var(--line); }
.seg a:last-child { border-right: 0; }
.seg a.active { background: var(--accent); color: var(--accent-fg); }
.seg a:hover { text-decoration: none; }
select, input[type="search"], input[type="number"] {
  font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); min-width: 0;
}
.inline { display: inline; }

/* converter */
.converter { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: end; }
.converter label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.converter input, .converter select { font-size: 1.05rem; width: 100%; }
.converter .swap { justify-self: center; font-size: 1.3rem; background: none; border: 1px solid var(--line); border-radius: 50%; width: 40px; height: 40px; cursor: pointer; color: var(--fg); }
.converter .result { grid-column: 1 / -1; font-size: 1.5rem; margin-top: 6px; }
.converter .result strong { font-size: 1.9rem; }
.converter #cv-rate { grid-column: 1 / -1; margin: 0; }
@media (min-width: 640px) { .converter { grid-template-columns: 1fr 1.4fr auto 1.4fr; } }

/* cta */
.cta {
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius);
  padding: 14px 16px; margin: 28px 0; background: var(--bg-2);
}
.cta p { color: var(--muted); margin: 4px 0 0; font-size: 0.92rem; }
.features ul { padding-left: 20px; }
.features li { margin: 6px 0; }

/* footer */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; padding: 18px 0 28px; }

/* takip listem */
.tk-search { position: relative; margin: 12px 0; }
.tk-search input { width: 100%; font-size: 1rem; }
.tk-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; max-height: 280px; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.tk-result { display: block; width: 100%; text-align: left; padding: 8px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--fg); font: inherit; cursor: pointer; }
.tk-result:hover { background: var(--bg-2); }
.tk-result:disabled { color: var(--muted); cursor: default; }
.tk-actions { white-space: nowrap; }
.tk-btn { background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); cursor: pointer; font: inherit; padding: 2px 8px; margin-left: 4px; }
.tk-btn:hover:not(:disabled) { color: var(--fg); }
.tk-btn:disabled { opacity: .35; cursor: default; }
.tk-rm:hover:not(:disabled) { color: var(--down); border-color: var(--down); }

/* calculators & calendar */
.calc { display: grid; grid-template-columns: 1fr; gap: 12px; }
.calc label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; color: var(--muted); }
.calc input { font-size: 1.05rem; width: 100%; }
.calc-out { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; }
.calc-big { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 4px 0 10px; }
.calc-big strong { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.calc-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.calc-line strong { font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .calc { grid-template-columns: 1fr 1fr; } }
table.calendar tr.past { opacity: .55; }
table.calendar tr.next td { font-weight: 600; }
.next-event h2 { margin: 2px 0 4px; }

/* blog */
.post { max-width: 760px; }
.post h1 { font-size: 2rem; }
.post h2 { font-size: 1.35rem; margin-top: 1.8em; }
.post h3 { font-size: 1.1rem; margin-top: 1.4em; }
.post p, .post li { font-size: 1.04rem; line-height: 1.65; }
.post ul, .post ol { padding-left: 22px; }
.post li { margin: 4px 0; }
.post blockquote { border-left: 3px solid var(--accent); margin: 16px 0; padding: 4px 14px; color: var(--muted); }
.post hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.toc ol { margin: 6px 0 0; padding-left: 20px; }
.toc li { margin: 2px 0; }
.post-card h3 { margin-top: 4px; }
.post-card .sym { margin-left: 0; }
.chips a.active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
