/* eve-tools.online — shared design system.
 * Every page loads this first; a page's own <style> only adds its layout.
 * Colours are tokens below — change them here, never per page.
 * Text tokens are checked for ≥ 4.5:1 contrast on --bg and --surface.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/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+2074, 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('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg:            #0d0f14;
  --surface:       #111520;
  --surface-2:     #161d2c;
  --surface-sunk:  #0b0e15;
  --border:        #1e3a5f;
  --border-soft:   #19243a;
  --text:          #c8ccd4;
  --text-strong:   #eef1f6;
  --muted:         #93a1b3;   /* secondary text: 7.3:1 on --bg, 6.4:1 on --surface-2 */
  --faint:         #7d8b9e;   /* hints, captions: 5.5:1 on --bg, 4.9:1 on --surface-2 */
  --accent:        #7eb8d4;
  --accent-strong: #2a6aa3;
  --primary:       #1d4f7c;
  --primary-hover: #2a6aa3;
  --ok:            #6bbf8a;
  --warn:          #e0a050;
  --danger:        #e07070;
  --sec-high:      #6bbf8a;
  --sec-low:       #e0a050;
  --sec-null:      #e07070;
  --radius:        8px;
  --radius-sm:     6px;
  --font:          'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --mono:          ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --nav-h:         56px;
  --page-w:        1180px;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
[hidden] { display: none !important; }

/* Icons: <svg class="icon"><use href="/assets/icons.svg#route"/></svg> */
.icon { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.125em; }

/* ── Site navigation ──────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(17, 21, 32, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px;
  flex-shrink: 0;
}
.site-nav .brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-strong); font-weight: 700; font-size: 15px; letter-spacing: .01em;
  white-space: nowrap;
}
.site-nav .brand img { width: 30px; height: 30px; display: block; }
.site-nav .brand:hover { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 11px; border-radius: var(--radius-sm);
  color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.nav-links a .icon { width: 16px; height: 16px; }
.nav-links a:hover { color: var(--text-strong); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text-strong); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-menu-btn {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 7px 10px; cursor: pointer; font: inherit; font-size: 13.5px;
  align-items: center; gap: 7px;
}
.nav-menu-btn .icon { width: 18px; height: 18px; }
@media (max-width: 1100px) {
  .nav-menu-btn { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px 12px 12px; box-shadow: 0 12px 24px rgba(0,0,0,.45);
  }
  .site-nav.open .nav-links { display: flex; }
  .nav-links a { padding: 11px 12px; font-size: 15px; }
  .nav-links a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
}

/* ── Page head (title + one-line description + data age) ─────────────── */
.page-head {
  max-width: var(--page-w); width: 100%; margin: 0 auto;
  padding: 28px 32px 6px;
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
}
.page-head .titles { flex: 1; min-width: 240px; }
.page-head h1 {
  display: flex; align-items: center; gap: 12px;
  font-size: 26px; font-weight: 700; color: var(--text-strong); letter-spacing: -.01em; line-height: 1.2;
}
.page-head h1 .icon { width: 28px; height: 28px; color: var(--accent); }
.page-head .lede { color: var(--muted); font-size: 14.5px; margin-top: 6px; max-width: 720px; }
.data-age {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--faint); white-space: nowrap;
  padding: 5px 10px; border: 1px solid var(--border-soft); border-radius: 999px; background: var(--surface);
}
.data-age .icon { width: 14px; height: 14px; }
.data-age b { color: var(--text); font-weight: 600; }
.data-age.stale b { color: var(--warn); }

/* ── Page body ────────────────────────────────────────────────────────── */
.page { max-width: var(--page-w); width: 100%; margin: 0 auto; padding: 20px 32px 48px; flex: 1; }

/* ── Panels ───────────────────────────────────────────────────────────── */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.panel-title {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

/* ── Forms ────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; position: relative; min-width: 0; }
.field > label, .field-label {
  font-size: 11.5px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: .06em;
}
input[type=text], input[type=number], input[type=search], input:not([type]), select, textarea {
  background: var(--surface-sunk); border: 1px solid var(--border); color: var(--text-strong);
  height: 38px; padding: 0 12px; border-radius: var(--radius-sm);
  font: inherit; font-size: 14.5px; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237eb8d4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
select:disabled, input:disabled { opacity: .5; cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(42, 106, 163, .25); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent-strong); width: 16px; height: 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.hint { font-size: 12.5px; color: var(--faint); line-height: 1.45; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-strong);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--accent-strong); color: var(--text-strong); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.copied, .btn.ok { border-color: var(--ok); color: var(--ok); }

/* ── Alerts ───────────────────────────────────────────────────────────── */
.alert { padding: 11px 14px; border-radius: var(--radius); font-size: 14px; border: 1px solid; }
.alert-warn { background: #2a2210; border-color: #5a4a20; color: #e8c88a; }
.alert-err  { background: #2a1518; border-color: #5a2a2a; color: #eab0b0; }
.alert-info { background: #10202e; border-color: var(--border); color: var(--text); }

/* ── Tables ───────────────────────────────────────────────────────────── */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; color: var(--faint); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--border-soft); color: var(--text); }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data th.n, table.data td.n { text-align: right; }
.table-wrap { overflow-x: auto; }

/* ── Badges, stats ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 4px; border: 1px solid var(--border); color: var(--accent);
}
.stat .v { font-size: 22px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .l { font-size: 11.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.sec-high { color: var(--sec-high); } .sec-low { color: var(--sec-low); } .sec-null { color: var(--sec-null); }

/* ── Empty state ──────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 20px; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius); background: rgba(17, 21, 32, .5);
}
.empty-state > .icon { width: 36px; height: 36px; color: var(--accent); margin-bottom: 12px; }
.empty-state h2 { font-size: 17px; color: var(--text-strong); font-weight: 600; margin-bottom: 6px; }
.empty-state p { max-width: 560px; margin: 0 auto; font-size: 14px; line-height: 1.55; }
.empty-state .examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }

/* ── Autocomplete list (system / item pickers) ────────────────────────── */
.ac {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--accent-strong); border-radius: var(--radius-sm);
  max-height: 260px; overflow-y: auto; display: none; box-shadow: 0 10px 24px rgba(0,0,0,.5);
}
.ac div { padding: 8px 12px; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; color: var(--text); }
.ac div:hover, .ac div.on { background: var(--surface-2); color: var(--text-strong); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: auto; padding: 22px 32px;
  border-top: 1px solid var(--border-soft); background: var(--surface-sunk);
  font-size: 13px; color: var(--faint); text-align: left;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text-strong); }
.footer-discord {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text) !important; font-size: 13.5px; font-weight: 500;
  padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .15s, background .15s;
}
.footer-discord:hover { border-color: #5865F2; background: rgba(88, 101, 242, .12); }
.footer-discord svg { width: 18px; height: 18px; fill: #5865F2; color: #5865F2; flex-shrink: 0; }
.footer-powered { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.footer-powered-label { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.footer-powered a { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.footer-powered a:hover { color: var(--accent); }
.footer-powered-tagline { font-size: 11.5px; color: var(--muted); font-style: italic; }

/* ── Phone ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .site-nav { padding: 0 14px; }
  .page-head { padding: 20px 16px 4px; }
  .page-head h1 { font-size: 21px; }
  .page-head h1 .icon { width: 23px; height: 23px; }
  .page { padding: 14px 16px 36px; }
  .panel { padding: 14px; }
  input[type=text], input[type=number], input[type=search], input:not([type]), select, textarea { font-size: 16px; } /* no iOS zoom */
  .site-footer { padding: 20px 16px; flex-direction: column; text-align: center; }
  .footer-powered { align-items: center; }
}
