/* Oxford Economics Redesign — Design System */
:root {
  /* Navy anchor — deepened, desaturated */
  --navy-900: oklch(0.22 0.04 255);
  --navy-800: oklch(0.28 0.05 255);
  --navy-700: oklch(0.36 0.06 255);
  --navy-600: oklch(0.46 0.08 255);
  --navy-500: oklch(0.56 0.09 255);

  /* Neutrals — warm bone */
  --bone-50:  oklch(0.985 0.004 85);
  --bone-100: oklch(0.97 0.006 85);
  --bone-200: oklch(0.94 0.008 85);
  --bone-300: oklch(0.89 0.01 85);
  --bone-400: oklch(0.78 0.012 85);
  --bone-500: oklch(0.62 0.012 85);
  --bone-600: oklch(0.48 0.012 85);
  --bone-700: oklch(0.36 0.012 85);
  --bone-800: oklch(0.26 0.012 85);
  --bone-900: oklch(0.16 0.012 85);

  /* Accents */
  --accent: oklch(0.72 0.15 65);      /* amber */
  --accent-ink: oklch(0.42 0.13 55);
  --accent-bg: oklch(0.96 0.04 75);
  --pos: oklch(0.62 0.15 155);        /* green */
  --neg: oklch(0.58 0.18 25);         /* red */
  --info: oklch(0.58 0.12 235);       /* sky */

  /* Surfaces */
  --bg: var(--bone-50);
  --surface: #ffffff;
  --surface-2: var(--bone-100);
  --border: var(--bone-200);
  --border-strong: var(--bone-300);
  --ink: var(--bone-900);
  --ink-2: var(--bone-700);
  --ink-3: var(--bone-500);

  /* Type */
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --font-sans: "Inter", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Radius & shadow */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 14px;
  --shadow-sm: 0 1px 2px rgb(20 28 46 / 0.04), 0 1px 1px rgb(20 28 46 / 0.03);
  --shadow-md: 0 4px 12px rgb(20 28 46 / 0.06), 0 1px 2px rgb(20 28 46 / 0.04);
  --shadow-lg: 0 10px 30px rgb(20 28 46 / 0.08), 0 2px 6px rgb(20 28 46 / 0.04);
}

* { box-sizing: border-box; }

.oe-root {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

.oe-root h1, .oe-root h2, .oe-root h3, .oe-root h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.serif { font-family: var(--font-serif); }

/* ===================== SHARED: TOPBAR ===================== */
.oe-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.oe-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.oe-logo-img {
  height: 52px;
  width: auto;
  display: block;
}

.oe-topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 40px;
}
.oe-search-mega {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink-3);
  cursor: text;
  transition: all 0.15s;
}
.oe-search-mega:hover { border-color: var(--border-strong); background: var(--surface); }
.oe-search-mega .kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink-3);
}

.oe-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.oe-askoe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  background: var(--navy-900);
  color: white;
  border-radius: 999px;
  font-weight: 500;
  font-size: 13px;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.1) inset, 0 2px 6px rgb(20 28 46 / 0.18);
}
.oe-askoe .spark {
  width: 14px; height: 14px;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--accent);
}
.oe-iconbtn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}
.oe-iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.oe-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.7 0.08 40), oklch(0.55 0.1 30));
  display: inline-flex;
  align-items: center; justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 12px;
  margin-left: 6px;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border);
}

/* ===================== SHARED: SIDENAV ===================== */
.oe-sidenav {
  width: 64px;
  background: var(--navy-900);
  color: rgb(255 255 255 / 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0;
  gap: 4px;
  position: relative;
}
.oe-sidenav-item {
  width: 44px; height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  font-size: 9px;
  gap: 3px;
  color: rgb(255 255 255 / 0.6);
  text-decoration: none;
}
a.oe-sidenav-item { color: rgb(255 255 255 / 0.6); }
a.oe-sidenav-item:hover { color: white; }
a.oe-sidenav-item.active { color: white; }
.oe-sidenav-item:hover { background: rgb(255 255 255 / 0.06); color: white; }
.oe-sidenav-item.active {
  background: rgb(255 255 255 / 0.1);
  color: white;
  box-shadow: inset 2px 0 0 var(--accent);
}
.oe-sidenav-divider {
  width: 28px;
  height: 1px;
  background: rgb(255 255 255 / 0.1);
  margin: 8px 0;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn:hover { background: var(--surface-2); }
.btn.primary {
  background: var(--navy-900);
  color: white;
  border-color: var(--navy-900);
}
.btn.primary:hover { background: var(--navy-800); }
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.sm { padding: 5px 10px; font-size: 12px; }

/* ===================== CHIPS / TAGS ===================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 500;
}
.chip:hover { background: var(--bone-200); color: var(--ink); }
.chip.active { background: var(--navy-900); color: white; border-color: var(--navy-900); }
.chip.accent { background: var(--accent-bg); color: var(--accent-ink); border-color: transparent; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-sans);
}
.badge.new { background: var(--accent); color: var(--navy-900); }
.badge.live { background: var(--pos); color: white; }
.badge.subtle { background: var(--bone-200); color: var(--ink-2); }
.badge.navy { background: var(--navy-900); color: white; }

/* ===================== KPI / SPARKLINES ===================== */
.kpi-row {
  display: grid;
  gap: 0;
}
.kpi {
  padding: 14px 18px;
  border-right: 1px solid var(--border);
}
.kpi:last-child { border-right: none; }
.kpi-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.kpi-value {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.kpi-value .delta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}
.delta.pos { color: var(--pos); }
.delta.neg { color: var(--neg); }
.kpi-sub {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
  font-family: var(--font-mono);
}

/* ===================== SECTION HEADERS ===================== */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-title .count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 400;
}
.section-link {
  font-size: 12px;
  color: var(--navy-700);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.section-link:hover { color: var(--navy-900); }

/* Eyebrow label */
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.eyebrow.accent { color: var(--accent-ink); }
.eyebrow.navy { color: var(--navy-700); }

/* ===================== CARDS ===================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* Placeholder imagery */
.img-ph {
  background:
    repeating-linear-gradient(135deg,
      var(--bone-100) 0 6px,
      var(--bone-200) 6px 7px);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* scrollbar */
.scroll-x, .scroll-y { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
