:root {
  --bg: #0f1115; --panel: #181b22; --line: #2a2f3a;
  --ink: #e7e9ee; --muted: #8b93a5; --accent: #7c9cff; --accent2: #59e0b8;
  --up: #59e0b8; --down: #ff7c7c;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  display: flex; justify-content: center; padding: 40px 16px 80px;
}
.wrap { width: 100%; max-width: 1080px; }

a.back {
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink);
  text-decoration: none; font-size: 15px; font-weight: 600; margin-bottom: 20px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); transition: border-color .15s ease, transform .05s ease;
}
a.back:hover { border-color: var(--accent); transform: translateX(-2px); }

header h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: -.01em; }
header p.tagline { margin: 0 0 8px; color: var(--muted); max-width: 640px; }
.updated { color: var(--muted); font-size: 12.5px; margin-bottom: 24px; }
.updated b { color: var(--accent2); }

nav.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
nav.tabs a {
  color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
}
nav.tabs a.active { color: var(--ink); border-color: var(--accent); }
nav.tabs a:hover { color: var(--ink); border-color: var(--accent); }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; margin-bottom: 20px;
}
.panel h2 { margin: 0 0 4px; font-size: 18px; }
.panel p.hint { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: rgba(124,156,255,.05); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.risk-low { color: var(--accent2); border-color: #294; }
.tag.risk-medium { color: #ffd166; border-color: #a86; }
.tag.risk-high { color: var(--down); border-color: #833; }

.bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.bar-label { width: 110px; flex-shrink: 0; font-size: 12.5px; color: var(--muted); }
.bar-track { flex: 1; height: 14px; background: #11141a; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.bar-value { width: 56px; text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; }

input, select, button {
  font: inherit; background: #11141a; color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px;
}
button { cursor: pointer; background: var(--accent); color: #0f1115; font-weight: 700; border: none; }
button:hover { filter: brightness(1.08); }
button.secondary { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #11141a; font-size: 13px; margin: 3px 4px 3px 0;
}
.chip button { padding: 0 4px; background: transparent; color: var(--muted); font-weight: 700; }
.chip button:hover { color: var(--down); }

.style-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; background: #11141a;
}
.style-card.selected { border-color: var(--accent); }
.style-card h3 { margin: 0 0 6px; font-size: 15px; }
.style-card p { margin: 0; color: var(--muted); font-size: 13px; }

.empty { color: var(--muted); font-size: 13.5px; padding: 20px 0; }
.muted { color: var(--muted); }
.about { margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.about h2 { font-size: 17px; margin: 0 0 10px; }
.about p { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; max-width: 760px; }
footer { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: 48px; }
footer a { color: var(--muted); }
