/* ChartHall — temel stiller: fontlar, renk belirteçleri, sıfırlama, ortak bileşenler. */

/* IBM Plex Sans / Mono — SIL OFL 1.1, öz-barındırımlı (fonts/IBM-Plex-*-OFL.txt) */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-400-normal.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: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-ext-400-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-500-normal.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: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-ext-500-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-600-normal.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: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-ext-600-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/ibm-plex-mono-latin-400-normal.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: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/ibm-plex-mono-latin-ext-400-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/ibm-plex-mono-latin-500-normal.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: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/ibm-plex-mono-latin-ext-500-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root,
[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0d1015;
  --surface: #13171e;
  --surface-2: #191e27;
  --surface-3: #232a35;
  --border: #252c37;
  --border-strong: #343d4b;
  --text: #e6e9ee;
  --text-2: #a4aebb;
  --text-3: #7d8796;
  --accent: #3a6fe8;
  --accent-hover: #4c7ef0;
  --accent-text: #7ba1f7;
  --accent-soft: rgba(58, 111, 232, 0.14);
  --on-accent: #ffffff;
  --up: #26a77c;
  --down: #e24c55;
  --warn: #d9a441;
  --chart-bg: #0d1015;
  --chart-grid: #1a1f27;
  --focus: #8fb1ff;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

[data-theme='light'] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef0f4;
  --surface-3: #e2e6ec;
  --border: #e1e5eb;
  --border-strong: #c9d0da;
  --text: #121720;
  --text-2: #4a5462;
  --text-3: #636d7b;
  --accent: #2457d6;
  --accent-hover: #1d4bc0;
  --accent-text: #1f4fc8;
  --accent-soft: rgba(36, 87, 214, 0.09);
  --on-accent: #ffffff;
  --up: #0d8a5f;
  --down: #cf3a43;
  --warn: #946200;
  --chart-bg: #ffffff;
  --chart-grid: #f0f2f5;
  --focus: #2457d6;
  --shadow: 0 8px 28px rgba(18, 23, 32, 0.12);
}

:root {
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --radius: 6px;
  --radius-sm: 4px;
  --header-h: 60px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent-text); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, kbd, .mono { font-family: var(--font-mono); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: var(--radius);
  text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* Butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius);
  border: 1px solid transparent; background: var(--surface-2); color: var(--text);
  font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border-color: var(--border-strong); }
.btn-outline:hover { background: var(--surface-2); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }
.btn[aria-disabled='true']:hover { background: var(--surface-2); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid transparent;
  background: transparent; color: var(--text-2); padding: 0;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-icon-light { display: none; }
[data-theme='light'] .theme-icon-light { display: block; }
[data-theme='light'] .theme-icon-dark { display: none; }

/* Rozetler */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.badge[data-kind='delayed']::before { background: var(--warn); }
.badge[data-kind='realtime']::before { background: var(--up); }
.badge[data-kind='daily']::before { background: var(--accent-text); }
.badge[data-kind='error']::before { background: var(--down); }
.badge-plain::before { display: none; }

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

/* Formlar */
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--text-2); }
.input {
  min-height: 44px; width: 100%; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font-size: 16px;
}
.input::placeholder { color: var(--text-3); }
.input:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.form-status { min-height: 1.5em; font-size: 14px; color: var(--text-2); }
.form-status[data-state='error'] { color: var(--down); }
.form-status[data-state='ok'] { color: var(--up); }

/* Üst gezinme */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--text);
  text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.015em;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--radius);
  color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current='page'] { color: var(--text); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 16px;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { min-height: 48px; font-size: 16px; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0 4px; }
  .site-nav a:last-child { border-bottom: 0; }
  .menu-toggle { display: inline-flex; }
  .header-actions .btn-outline { display: none; }
}
@media (max-width: 400px) {
  .header-actions .btn { padding: 0 12px; font-size: 14px; }
}

/* Alt bilgi */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 40px; margin-top: 96px; color: var(--text-2); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 32px; }
.footer-grid h2 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-grid a { color: var(--text-2); text-decoration: none; display: inline-block; padding: 4px 0; }
.footer-grid a:hover { color: var(--text); text-decoration: underline; }
.footer-grid .brand { display: inline-flex; color: var(--text); }
.footer-grid .brand:hover { text-decoration: none; }
.footer-note { margin-top: 12px; max-width: 42ch; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--text-3); }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
