:root {
  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #10141c;
  --muted: #667085;
  --border: #e4e7ec;
  --accent: #0babe5;
  --red: #c0392b;
  --green: #1e8449;
  --notice-bg: #fff8e1;
  --notice-border: #f0c419;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 22px;
  background: #000;
  border-bottom: 1px solid #2a2a2a;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0;
  color: #fff;
  display: inline-flex;
  align-items: center;
}
.flag-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 9px;
  flex-shrink: 0;
}
.menu-toggle {
  display: none;
  margin-left: auto;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.topbar-collapsible { display: flex; align-items: center; gap: 28px; flex: 1; flex-wrap: wrap; }
.topbar nav { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
  font-family: var(--font);
  color: rgba(255,255,255,.85);
  font-weight: 600;
  font-size: 14px;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 7px 14px;
  transition: background .15s, border-color .15s, color .15s;
}
.topbar nav a:hover { color: #fff; background: #262626; border-color: #4a4a4a; text-decoration: none; }
.topbar-right { display: flex; align-items: center; gap: 10px; position: relative; }
#global-search {
  padding: 7px 12px;
  border: 1px solid #3a3a3a;
  background: #fff;
  color: var(--text);
  border-radius: 4px;
  width: 220px;
  font-size: 13px;
  font-family: var(--font);
}
#global-search::placeholder { color: var(--muted); }
#global-search:focus { outline: none; border-color: var(--accent); }
.search-results {
  position: absolute;
  top: 36px;
  right: 40px;
  width: 260px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.1);
  z-index: 20;
}
.search-results a { display: block; padding: 8px 10px; color: var(--text); border-bottom: 1px solid var(--border); font-size: 13px; }
.search-results a:hover { background: var(--bg); text-decoration: none; }
.search-results .kind { color: var(--muted); font-size: 11px; text-transform: uppercase; margin-left: 6px; }
.hidden { display: none !important; }

.lang-flags {
  display: flex;
  gap: 2px;
  background: #141414;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 3px;
}
.flag-btn {
  border: none;
  background: none;
  font-size: 16px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 3px;
  cursor: pointer;
  opacity: .45;
  filter: grayscale(60%);
  transition: opacity .15s, filter .15s, background .15s;
}
.flag-btn:hover { opacity: .8; }
.flag-btn.active { opacity: 1; filter: none; background: rgba(255,255,255,.14); }

.quote-bar {
  display: flex;
  align-items: center;
  background: #232323;
  font-family: var(--font);
  border-bottom: 1px solid #2a2a2a;
  padding: 7px 22px;
}
.quote-bar-inner { max-width: 1100px; margin: 0 auto; width: 100%; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.quote-tag { font-size: 14px; font-weight: 700; letter-spacing: 0.02em; color: #ff9f0a; flex-shrink: 0; }
.quote-text { color: #fff; font-size: 14px; line-height: 1.3; }
.quote-author { color: #6ec6ff; font-size: 14px; }
.quote-author a { color: inherit; text-decoration: underline; }

.hero-panel { text-align: center; }
.hero-panel h1 { font-size: 34px; margin-bottom: 10px; }
.hero-panel .intro { color: var(--text); font-size: 14px; }
.hero-panel .stat-line { margin-left: auto; margin-right: auto; }
.hero-panel .home-search { max-width: 480px; margin: 14px auto 0; text-align: left; }

.notice {
  background: var(--notice-bg);
  border-bottom: 1px solid var(--notice-border);
  padding: 10px 40px;
  font-size: 14px;
  color: #6b5900;
  position: relative;
  text-align: center;
}
.notice a { color: #6b5900; font-weight: 700; text-decoration: underline; }
.notice button {
  position: absolute;
  right: 12px;
  top: 6px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #6b5900;
}

main { max-width: 1100px; margin: 0 auto; padding: 20px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 10px; }
.subtle { color: var(--muted); font-size: 12.5px; }
.stat-line { margin: 6px 0 14px; color: var(--muted); font-size: 13px; }
.stat-line b { color: var(--text); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 13px; }
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border); }
th { cursor: pointer; color: var(--muted); font-weight: 700; user-select: none; white-space: nowrap; }
th:hover { color: var(--text); }
th::after { content: " \21C5"; font-size: 9px; opacity: .35; }
th.sorted::after { content: " \25BC"; font-size: 9px; opacity: 1; }
th.sorted-asc::after { content: " \25B2"; font-size: 9px; opacity: 1; }
td.num, th.num { text-align: right; }
tr:hover td { background: #fafbfc; }

.pos { color: var(--green); }
.neg { color: var(--red); }

.chart-wrap { position: relative; }
.line-chart { width: 100%; aspect-ratio: 700 / 220; height: auto; display: block; cursor: crosshair; }
.chart-area { fill: var(--accent); fill-opacity: .08; stroke: none; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart-label { font-size: 9px; fill: var(--muted); font-family: var(--font); }
.chart-hover-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 2; }
.chart-hover-dot { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.chart-tooltip {
  position: absolute;
  top: -2px;
  padding: 4px 8px;
  background: var(--text);
  color: #fff;
  font-size: 11px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}

.badge { display: inline-block; padding: 2px 7px; border-radius: 10px; background: #eef1f6; color: var(--muted); font-size: 11px; }

.filter-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.filter-row input[type=search] { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; min-width: 220px; }
.filter-row select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  color: #fff;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  vertical-align: middle;
  margin-right: 6px;
  flex-shrink: 0;
}
.avatar-lg { width: 40px; height: 40px; border-radius: 10px; font-size: 15px; margin-right: 10px; }
.logo {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 6px;
  background: #fff;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.logo-lg { width: 40px; height: 40px; border-radius: 9px; margin-right: 10px; padding: 3px; }
.title-with-avatar { display: flex; align-items: center; }

.home-search { margin-bottom: 4px; position: relative; }
.home-search input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #000;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font);
  background: #000;
  color: #ff9f0a;
}
.home-search input::placeholder { color: rgba(255,159,10,.55); }
.home-search input:focus { outline: none; border-color: var(--accent); }
.home-search .search-results { left: 0; right: 0; top: 50px; width: auto; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

footer { text-align: center; color: var(--muted); font-size: 11.5px; padding: 24px 10px; }

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

.ad-slot {
  display: flex;
  justify-content: center;
  padding: 12px 20px 0;
}
.ad-slot-inner {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}
.ad-slot-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .topbar-collapsible {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: 14px;
  }
  .topbar-collapsible.open { display: flex; }
  .topbar-collapsible nav { flex-direction: column; gap: 8px; width: 100%; }
  .topbar-collapsible nav a { width: 100%; text-align: center; }
  .topbar-right { flex-direction: column; align-items: stretch; gap: 10px; }
  #global-search { width: 100%; }
  .search-results { left: 0; right: 0; width: auto; }
  .lang-flags { align-self: flex-start; }
  .quote-bar-inner { justify-content: center; text-align: center; }
}

@media (max-width: 640px) {
  .topbar { gap: 10px; }
  td.num, th.num { text-align: center; }
}
