:root {
  color-scheme: dark;
  --bg: #0c1219;
  --sidebar: #0e1620;
  --panel: #141c28;
  --panel-edge: rgba(143, 191, 176, 0.12);
  --border: #243041;
  --ink: #e8eef4;
  --muted: #8496a8;
  --accent: #8fbfb0;
  --accent-soft: #a8d4c6;
  --peach: #e0b892;
  --peach-bg: #241e19;
  --peach-border: #6b593c;
  --wash: radial-gradient(ellipse 90% 60% at 12% -10%, rgba(143, 191, 176, 0.14), transparent 55%),
          radial-gradient(ellipse 70% 50% at 92% 8%, rgba(224, 184, 146, 0.08), transparent 50%),
          radial-gradient(ellipse 50% 40% at 70% 100%, rgba(80, 120, 140, 0.1), transparent 55%);
  --font-display: 'Bricolage Grotesque', 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-ui: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  font-family: var(--font-ui);
}

* { box-sizing: border-box }

body {
  margin: 0;
  background: var(--bg);
  background-image: var(--wash);
  background-attachment: fixed;
  color: var(--ink);
  font-size: 14px;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

button, select, input { font: inherit }
button { cursor: pointer }
a { color: var(--accent); text-decoration: none }

.shell {
  display: grid;
  grid-template-columns: 254px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  background: color-mix(in srgb, var(--sidebar) 92%, transparent);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--border);
  padding: 28px 17px;
  display: flex;
  flex-direction: column;
  gap: 17px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #ecf4f4;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 15px;
  line-height: 1.15;
  padding: 8px 9px 26px;
  animation: brand-in 0.7s ease-out both;
}

.brand-text { display: block }
.brand-period-inline { color: var(--accent) }

.brandmark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: #1a2a32;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, #52756e);
  color: var(--accent);
  border-radius: 9px;
  font-family: var(--font-ui);
  font-size: 28px;
  font-weight: 700;
  line-height: 0;
  letter-spacing: 0;
}

.brand-period {
  display: block;
  transform: translateY(4px);
  color: var(--accent);
}

.brand small {
  display: block;
  font-family: var(--font-mono);
  color: #748a95;
  letter-spacing: 0.08em;
  font-size: 9px;
  font-weight: 500;
  margin-top: 6px;
  text-transform: lowercase;
}

@keyframes brand-in {
  from { opacity: 0; transform: translateY(6px) }
  to { opacity: 1; transform: none }
}

@keyframes title-fade {
  from { opacity: 0; transform: translateY(4px) }
  to { opacity: 1; transform: none }
}

@keyframes breathe {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(143, 191, 176, 0.35) }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(143, 191, 176, 0) }
}

.page-title.title-enter,
h1.title-enter {
  animation: title-fade 0.35s ease-out both;
}

.side-section,
.section-kicker,
.eyebrow,
.filter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: #8197a9;
  font-weight: 600;
}

.side-section { margin: 8px 13px 0 }

nav { display: grid; gap: 4px }

.nav {
  border: 0;
  background: transparent;
  color: #8da0b1;
  text-align: left;
  padding: 13px 14px;
  border-radius: 7px;
  width: 100%;
}

.nav span {
  display: inline-block;
  width: 25px;
  font-size: 18px;
  vertical-align: middle;
}

.nav.active {
  background: #1c3138;
  color: #c2e9de;
  border-left: 2px solid var(--accent);
}

.nav:hover { background: #1a2734; color: white }

.muted-nav { color: #607487; margin: 8px 14px; font-size: 12px }
.muted-nav span { float: right; font-size: 9px; letter-spacing: 1px; color: #78818d }

.side-bottom {
  margin-top: auto;
  padding: 20px 13px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.side-bottom small {
  display: block;
  margin: 9px 0 0 13px;
  color: #6c7c8c;
  font-family: var(--font-mono);
  font-size: 10px;
}

.status-dot,
.pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  animation: breathe 2.8s ease-in-out infinite;
}

.topbar {
  height: 70px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 43px;
}

.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.3px;
  color: #8da0ae;
}

.breadcrumbs span { margin: 0 12px; color: #526477 }
.breadcrumbs b { color: #c5d6df; font-weight: 600 }

.topright {
  color: #8596a6;
  font-size: 11px;
  display: flex;
  gap: 18px;
  align-items: center;
  font-family: var(--font-mono);
}

.topright a {
  padding: 9px 13px;
  border: 1px solid #344554;
  border-radius: 5px;
  color: #c2d1d8;
}

.content { max-width: 1440px; margin: auto; padding: 46px 43px }

.intro {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 33px;
}

.eyebrow { color: #a8c6bc }

.hline {
  display: inline-block;
  width: 34px;
  background: #69958d;
  height: 1px;
  vertical-align: middle;
  margin-left: 10px;
}

h1,
.page-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.8vw, 48px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: 16px 0 10px;
  font-optical-sizing: auto;
}

h1 em,
.page-title em {
  color: var(--accent-soft);
  font-style: normal;
}

.intro p {
  max-width: 705px;
  color: #93a5b4;
  line-height: 1.75;
  margin: 0;
}

.edition {
  text-align: right;
  color: #718593;
  letter-spacing: 2px;
  font-size: 10px;
  line-height: 2.3;
  white-space: nowrap;
  font-family: var(--font-mono);
}

.edition strong { color: #bed0d3; font-size: 12px }

.notice {
  display: flex;
  align-items: baseline;
  gap: 13px;
  border: 1px solid var(--peach-border);
  background: var(--peach-bg);
  padding: 15px 18px;
  border-radius: 6px;
  color: #c2ad8b;
  margin-bottom: 23px;
  font-size: 12px;
  line-height: 1.7;
}

.notice b { color: var(--peach) }

.filters {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--panel-edge);
  padding: 15px 19px;
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 25px;
  border-radius: 7px;
  flex-wrap: wrap;
}

.filters label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #8192a5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filters select,
.searchbar select {
  background: #192532;
  border: 1px solid #334553;
  border-radius: 5px;
  color: #e1e8ef;
  padding: 10px 12px;
  max-width: 200px;
  font-size: 12px;
  font-family: var(--font-ui);
}

.filter-label { margin-right: 6px }
.filter-note { margin-left: auto; font-size: 10px; color: #778c9c }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 var(--panel-edge);
}

.metric { padding: 20px 20px 18px; min-height: 145px }

.metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.1px;
  color: #a4b5c3;
  display: flex;
  justify-content: space-between;
  gap: 5px;
}

.metric-label span { color: #769f95; font-size: 17px }

.metric-num {
  font-size: 37px;
  letter-spacing: -1.8px;
  font-weight: 600;
  margin: 17px 0 6px;
  font-variant-numeric: tabular-nums;
}

.metric-num.subdued { color: #7c8f9f }
.metric-foot { color: #7c91a1; font-size: 10px; line-height: 1.5 }

.panel-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.panel { padding: 24px; min-width: 0 }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 23px;
}

.panel h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 8px 0 0;
}

.chip {
  background: #1a2932;
  border: 1px solid #334751;
  color: #a6c5bf;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  font-family: var(--font-mono);
}

.chartwrap {
  min-height: 255px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
}

.barrow {
  display: grid;
  grid-template-columns: 125px 1fr 48px;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #a8b7c4;
}

.track {
  height: 10px;
  background: #20303b;
  border-radius: 2px;
  overflow: hidden;
}

.fill {
  height: 100%;
  background: linear-gradient(90deg, #568c89, #a6d0bf);
}

.barrow strong {
  text-align: right;
  color: #dce8ed;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.panel-note {
  margin-top: 19px;
  padding-top: 15px;
  border-top: 1px solid #263543;
  color: #758b9b;
  font-size: 10px;
  line-height: 1.6;
}

.seniority {
  min-height: 255px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.levelrow {
  display: grid;
  grid-template-columns: 90px 1fr 58px;
  gap: 12px;
  align-items: center;
  color: #b6c5d0;
  font-size: 12px;
}

.levelrow span:last-child { text-align: right }

.leveltrack {
  height: 8px;
  background: #253743;
  border-radius: 3px;
  overflow: hidden;
}

.leveltrack i {
  display: block;
  height: 100%;
  background: var(--peach);
}

.lower { grid-template-columns: 1fr 1fr }
.rankings { min-height: 200px }

.rank {
  display: grid;
  grid-template-columns: 30px 1fr 70px;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid #24313e;
  align-items: center;
}

.rank .index { color: #78978f; font-size: 12px }
.rank b { font-size: 12px; font-weight: 500 }
.rank strong { text-align: right; font-size: 12px }

.insight p,
.research-page p {
  line-height: 1.75;
  color: #93a5b4;
  font-size: 13px;
}

.research-row {
  display: flex;
  align-items: center;
  gap: 15px;
  border-top: 1px solid #263543;
  padding: 13px 0;
  font-size: 12px;
}

.research-row small {
  display: block;
  margin-top: 4px;
  color: #758b9b;
}

.tag {
  padding: 6px 8px;
  font-size: 9px;
  border-radius: 3px;
  min-width: 88px;
  text-align: center;
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

.available { background: #18352f; color: #9fd7bf }
.pending { background: #302b24; color: #cab18a }

.empty {
  text-align: center;
  padding: 45px 12px;
  color: #71879a;
  font-size: 12px;
}

.hidden { display: none }

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
}

.searchbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.searchbar input {
  flex: 1;
  min-width: 0;
  border: 1px solid #334553;
  background: #192532;
  padding: 13px;
  color: #e4eff5;
  border-radius: 5px;
}

.jobrow {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 100px;
  gap: 16px;
  padding: 17px 12px;
  border-top: 1px solid #273644;
  align-items: center;
  font-size: 12px;
}

.jobrow:hover { background: #182634 }
.jobrow strong { font-weight: 600 }
.jobrow span { color: #90a4b3 }
.jobrow a { text-align: right }

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #879caa;
  font-size: 11px;
  padding-top: 18px;
}

.pager {
  background: #1c2d38;
  border: 1px solid #38515d;
  color: #d3e1e4;
  padding: 9px 13px;
  border-radius: 5px;
  margin-left: 6px;
}

.pager:disabled { opacity: 0.35; cursor: default }

.studio-disclaimer { color: #95a5b3; line-height: 1.6 }

.studio-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  padding: 17px 12px;
  border-top: 1px solid #273644;
}

.studio-row strong { font-weight: 500 }
.studio-row span { text-align: right; color: #a6c9bc }
.pipe-school { align-items: start }
.pipe-school-meta {
  display: block;
  margin-top: 4px;
  color: #758b9b;
  font-size: 11px;
  text-align: left;
}

.map-panel { padding-bottom: 18px }

.jobs-map {
  height: min(70vh, 720px);
  min-height: 420px;
  border: 1px solid #263543;
  border-radius: 6px;
  background: #0c151f;
  z-index: 0;
}

.jobs-map .leaflet-container {
  background: #0c151f;
  font: inherit;
}

.job-pin { background: transparent; border: 0 }

.job-pin span {
  display: block;
  width: 14px;
  height: 14px;
  margin: 2px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #1c3138;
  box-shadow: 0 0 0 1px #52756e;
}

.job-cluster {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1c3138;
  border: 2px solid var(--accent);
  color: #c2e9de;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 0 0 1px #253b3a;
}

.job-cluster span { line-height: 1 }
.job-cluster-small { width: 32px; height: 32px }
.job-cluster-medium { width: 40px; height: 40px; font-size: 13px }
.job-cluster-large { width: 48px; height: 48px; font-size: 14px }

.map-popup {
  display: grid;
  gap: 6px;
  min-width: 160px;
  color: #1a2430;
  font-size: 12px;
  line-height: 1.45;
}

.map-popup strong { font-size: 13px; font-weight: 600 }
.map-popup-meta { color: #5d6f7f }

.map-popup-tag {
  display: inline-block;
  width: max-content;
  padding: 2px 7px;
  border-radius: 3px;
  background: #18352f;
  color: #9fd7bf;
  font-size: 10px;
  letter-spacing: 0.6px;
}

.map-popup a { color: #2f6f63; font-weight: 600 }

.leaflet-popup-content-wrapper {
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.leaflet-popup-content { margin: 12px 14px }
.leaflet-container a.leaflet-popup-close-button { color: #617484 }

.trend-panel,
.baseline-panel { margin-bottom: 18px }

.trend-chart { min-height: 120px }

.trend-grid,
.baseline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.trend-card,
.baseline-card {
  background: #0f1822;
  border: 1px solid #263543;
  border-radius: 6px;
  padding: 16px;
}

.traj-card { max-width: 720px }

.trend-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #8192a5;
  margin-bottom: 10px;
}

.trend-card strong,
.baseline-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  letter-spacing: -0.8px;
}

.sparkline {
  width: 100%;
  height: 72px;
  display: block;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: #8fa0b0;
  font-family: var(--font-mono);
}

.legend-swatch {
  width: 14px;
  height: 3px;
  border-radius: 1px;
  display: inline-block;
  background: currentColor;
}

.legend-swatch.dashed {
  height: 0;
  border-top: 2px dashed;
  background: transparent !important;
}

.coverage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 18px;
}

.cov-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  padding: 7px 10px;
  border-radius: 4px;
  border: 1px solid #334553;
  color: #a8b9c6;
}

.cov-live {
  background: #18352f;
  border-color: #3d6a5f;
  color: #9fd7bf;
}

.cov-miss {
  background: #302b24;
  border-color: #6b593c;
  color: #cab18a;
}

.warn-metrics { margin: 8px 0 12px }
.warn-row { grid-template-columns: 1.5fr 0.4fr 0.8fr 0.8fr }

.research-page { max-width: 920px }

.research-page h2 {
  font-family: var(--font-display);
  font-size: 28px;
  margin-top: 14px;
}

.research-page h3 {
  font-family: var(--font-display);
  font-size: 16px;
  margin-top: 35px;
}

.plain-summary {
  margin: 18px 0 0;
  padding-left: 20px;
  color: #c5d3de;
  line-height: 1.55;
}

.plain-summary li { margin: 10px 0 }
.plain-summary b { color: #e8f0f4 }

.source-entry {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #293744;
  padding: 22px 0;
}

.source-entry b { display: block; font-weight: 600 }

.source-entry small {
  display: block;
  color: #8598a7;
  margin-top: 8px;
}

.source-entry a { white-space: nowrap; font-size: 12px }

.research-page pre {
  background: #0c151f;
  border: 1px solid #293744;
  padding: 22px;
  color: #b6d9ca;
  overflow: auto;
  line-height: 1.7;
  font-size: 12px;
  font-family: var(--font-mono);
}

footer {
  margin-top: 45px;
  padding: 25px 0;
  border-top: 1px solid var(--border);
  color: #708797;
  font-size: 10px;
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

footer span { margin: 0 8px }
.footer-right { float: right; letter-spacing: 0 }
footer a { margin-left: 8px }

@media (max-width: 1050px) {
  .sidebar { width: 210px }
  .shell { grid-template-columns: 210px minmax(0, 1fr) }
  .metrics { grid-template-columns: repeat(2, 1fr) }
  .panel-grid { grid-template-columns: 1fr }
  .edition { display: none }
  .filter-note { display: none }
}

@media (max-width: 700px) {
  .shell { display: block }
  .sidebar {
    height: auto;
    position: static;
    width: 100%;
    padding: 12px 16px;
    gap: 3px;
  }
  .brand { padding: 4px }
  .sidebar .side-section,
  .sidebar .muted-nav,
  .sidebar .side-bottom { display: none }
  nav { display: flex; overflow: auto }
  nav .nav {
    white-space: nowrap;
    width: auto;
    padding: 9px;
    font-size: 11px;
  }
  .nav span { display: none }
  .topbar { padding: 15px 19px; height: auto }
  .topright { gap: 8px }
  .topright a { display: none }
  .content { padding: 30px 18px }
  .metrics { gap: 9px }
  .metric { padding: 15px; min-height: 130px }
  .metric-label { font-size: 9px }
  .metric-num { font-size: 30px }
  .panel { padding: 18px }
  .filters { gap: 12px }
  .filters label { flex: 1; justify-content: space-between }
  .filters select { max-width: 140px }
  .filter-label { width: 100% }
  .jobrow { grid-template-columns: 1fr auto; gap: 7px }
  .jobrow span:nth-child(3) { display: none }
  .jobrow a { grid-column: 2; grid-row: 1 }
  .footer-right { float: none; display: block; margin-top: 12px }
  .barrow { grid-template-columns: 98px 1fr 40px; gap: 8px; font-size: 11px }
}
