/* ============================================================
   XennOne — brand-locked stylesheet
   Source: Xennent Brand Standards Manual v1.1 + XennOne Spec v0.5
   Logo: approved Xennent X-mark (brand/xennent-x-mark.jpg) — triangle mark retired
   Hand-written (sandbox has no CDN access to Tailwind)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* --------- Design tokens --------- */
:root {
  --navy:        #071B35;
  --navy-2:      #0E2340;
  --navy-3:      #163055;
  --cream:       #F4E7D7;
  --cream-2:     #EAD9C5;
  --mist:        #E8E2DA;
  --slate:       #3D3D52;
  --xennone:     #1F8A32;
  --xennone-hover: #187025;
  --xennone-soft:  #E8F5EB;
  --xennone-border: #B8DFC1;
  --family:      #2FAE41;
  --teal:        #0A9FA3;
  --sage:        #4A7C59;
  --amber:       #C47C2B;
  --coral:       #C94040;
  --steel:       #4A6FA5;
  --white:       #FFFFFF;

  --font-sans: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;

  --shadow-sm: 0 1px 2px rgba(7,27,53,0.04);
  --shadow: 0 2px 8px rgba(7,27,53,0.06);
}

/* --------- Reset --------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--navy);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--navy);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }
svg { display: block; }

/* --------- Layout: shell --------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px;
  flex: 0 0 256px;
  background: var(--white);
  border-right: 1px solid var(--mist);
  display: flex;
  flex-direction: column;
}
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* --------- Sidebar --------- */
.sb-brand { padding: 24px 20px; border-bottom: 1px solid var(--mist); }
.sb-brand-row { display: flex; align-items: flex-start; gap: 10px; }
.sb-logo { width: 32px; height: 32px; object-fit: contain; flex: 0 0 32px; border-radius: 7px; margin-top: 1px; }
.sb-brand-text { display: flex; flex-direction: column; }
.sb-brand-name { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.sb-brand-sub { font-size: 10px; color: rgba(61,61,82,0.7); letter-spacing: 0.08em; margin-top: 3px; text-transform: uppercase; text-align: left; }
.sb-brand-link { display: block; }
.sb-brand-link:hover .sb-brand-name { color: var(--xennone-hover); }

.sb-entity { padding: 14px 16px; border-bottom: 1px solid var(--mist); }
.sb-entity-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(61,61,82,0.6); }
.sb-entity-btn {
  margin-top: 6px; width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: 6px; border: 1px solid var(--mist);
  background: rgba(244,231,215,0.5); text-align: left; font-size: 13px;
}
.sb-entity-btn:hover { background: var(--cream); }
.sb-entity-name { display: flex; align-items: center; gap: 8px; }
.sb-entity-meta { font-size: 10px; color: rgba(61,61,82,0.5); margin-top: 6px; }

.sb-nav { flex: 1; padding: 16px 12px; overflow-y: auto; font-size: 13px; }
.sb-group { margin-bottom: 20px; }
.sb-group-label { padding: 0 8px; margin-bottom: 8px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(61,61,82,0.5); }
.sb-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 6px;
  color: var(--slate); margin-top: 2px;
}
.sb-item:hover { background: var(--cream-2); color: var(--navy); }
.sb-item.active { background: var(--xennone); color: var(--white); font-weight: 500; }
.sb-item.active:hover { background: var(--xennone-hover); }
.sb-item-badge {
  margin-left: auto; font-size: 10px; padding: 2px 6px; border-radius: 999px;
  background: rgba(74,124,89,0.15); color: var(--sage); font-weight: 600;
}
.sb-item-badge.accent { background: rgba(31,138,50,0.15); color: var(--xennone); }

.sb-user {
  border-top: 1px solid var(--mist); padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
}
.sb-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.sb-user-info { flex: 1; }
.sb-user-name { font-size: 13px; font-weight: 500; line-height: 1.2; }
.sb-user-role { font-size: 11px; color: rgba(61,61,82,0.7); margin-top: 2px; }
.icon-btn { padding: 6px; border-radius: 6px; color: var(--slate); }
.icon-btn:hover { background: var(--cream-2); }

/* --------- Header --------- */
.hdr {
  background: var(--white); border-bottom: 1px solid var(--mist);
  padding: 16px 32px; display: flex; align-items: center; gap: 24px;
}
.hdr h1 { font-size: 20px; }
.hdr-sub { font-size: 11px; color: rgba(61,61,82,0.7); margin-top: 2px; }
.hdr-search { flex: 1; max-width: 640px; position: relative; }
.hdr-search-icon { position: absolute; left: 12px; top: 10px; color: rgba(61,61,82,0.5); }
.hdr-search input {
  width: 100%; padding: 8px 96px 8px 36px;
  border-radius: 6px; border: 1px solid var(--mist);
  background: rgba(244,231,215,0.4); font-size: 13px;
  outline: none; transition: all 0.15s;
}
.hdr-search input::placeholder { color: rgba(61,61,82,0.5); }
.hdr-search input:focus { background: var(--white); border-color: var(--xennone); box-shadow: 0 0 0 3px rgba(31,138,50,0.15); }
.hdr-kbd {
  position: absolute; right: 10px; top: 8px;
  font-family: var(--font-mono); font-size: 10px;
  padding: 3px 6px; border: 1px solid var(--mist); border-radius: 4px;
  background: var(--white); color: rgba(61,61,82,0.6);
}
.hdr-actions { display: flex; align-items: center; gap: 8px; }

/* --------- Buttons --------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 6px; font-size: 13px; font-weight: 500; transition: all 0.15s; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }
.btn-primary { background: var(--xennone); color: var(--white); }
.btn-primary:hover { background: var(--xennone-hover); }
.btn-outline { background: var(--white); border: 1px solid var(--mist); color: var(--navy); }
.btn-outline:hover { background: var(--cream); }
.btn-ghost { color: var(--slate); }
.btn-ghost:hover { background: var(--cream); }

/* --------- Content shell --------- */
.content { flex: 1; overflow-y: auto; padding: 24px 32px; }

/* --------- Cards --------- */
.card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 12px;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--mist);
}
.card-hd h2 { font-size: 15px; }
.card-hd-sub { font-size: 11px; color: rgba(61,61,82,0.6); margin-top: 2px; }
.card-body { padding: 20px; }

/* --------- Grids --------- */
.grid { display: grid; gap: 16px; }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.equiv-footnote { font-size: 10px; color: rgba(61,61,82,0.55); margin: -8px 0 24px 4px; line-height: 1.5; }
.equiv-line { font-size: 11px; color: rgba(61,61,82,0.65); margin-top: 4px; }
.col-2 { grid-column: span 2; }
.mb-24 { margin-bottom: 24px; }

/* --------- KPI cards --------- */
.kpi { padding: 20px; }
.kpi-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(61,61,82,0.6); }
.kpi-value { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.kpi-num { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.02em; }
.kpi-num-lg { font-size: 44px; }
.kpi-unit { font-size: 13px; color: rgba(61,61,82,0.7); font-weight: 500; }
.kpi-delta { font-size: 11px; font-weight: 500; }
.kpi-delta.up { color: var(--sage); }
.kpi-delta.down { color: var(--coral); }
.kpi-sub { font-size: 11px; color: rgba(61,61,82,0.6); margin-top: 4px; }
.progress { margin-top: 8px; height: 6px; background: var(--mist); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--xennone); }
.progress-fill.teal { background: var(--teal); }
.progress-fill.amber { background: var(--amber); }
.progress-fill.steel { background: var(--steel); }
.progress-fill.slate { background: var(--slate); }

/* --------- Feed rows --------- */
.feed { }
.feed-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 20px; border-top: 1px solid var(--mist);
  cursor: pointer; transition: background 0.15s;
}
.feed-item:first-child { border-top: 0; }
.feed-item:hover { background: rgba(244,231,215,0.3); }
.feed-icon {
  width: 32px; height: 32px; border-radius: 6px; flex: 0 0 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
}
.feed-icon.navy { background: var(--navy); color: var(--cream); }
.feed-icon.teal { background: var(--teal); }
.feed-icon.slate { background: var(--slate); }
.feed-icon.steel { background: var(--steel); }
.feed-icon.amber { background: var(--amber); }
.feed-body { flex: 1; min-width: 0; }
.feed-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-title { font-size: 13px; font-weight: 500; color: var(--navy); }
.feed-desc { font-size: 12px; color: rgba(61,61,82,0.75); margin-top: 4px; line-height: 1.5; }
.feed-desc.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-meta { font-size: 11px; color: rgba(61,61,82,0.5); margin-top: 6px; }
.feed-actions { color: rgba(61,61,82,0.5); }

/* --------- Chips / tags --------- */
.chip {
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: var(--mist); color: var(--slate); font-weight: 500;
}
.chip.accent { background: rgba(31,138,50,0.15); color: var(--xennone); font-weight: 600; }
.chip.amber-b { background: rgba(196,124,43,0.15); color: var(--amber); font-weight: 600; }
.chip.coral-b { background: rgba(201,64,64,0.15); color: var(--coral); font-weight: 600; }

/* --------- Dot indicators --------- */
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--xennone); }
.dot.sage { background: var(--sage); }
.dot.teal { background: var(--teal); }
.dot.amber { background: var(--amber); }
.dot.steel { background: var(--steel); }
.dot.slate-30 { background: rgba(61,61,82,0.3); }

/* --------- Sub navs / filter tabs --------- */
.tabs { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.tab { padding: 5px 10px; border-radius: 6px; color: var(--slate); }
.tab:hover { background: var(--cream); }
.tab.active { background: rgba(31,138,50,0.1); color: var(--xennone); font-weight: 600; }

/* --------- Entity list --------- */
.by-entity { padding: 20px; }
.by-entity-item { }
.by-entity-item + .by-entity-item { margin-top: 12px; }
.by-entity-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.by-entity-name { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.by-entity-count { font-variant-numeric: tabular-nums; color: var(--slate); }

/* --------- Recommendations --------- */
.recos { padding: 20px; }
.reco {
  padding: 12px; border-radius: 10px; border: 1px solid var(--mist); background: var(--cream);
}
.reco + .reco { margin-top: 12px; }
.reco.primary { background: var(--xennone-soft); border-color: var(--xennone-border); }
.reco-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.reco-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.reco.primary .reco-label { color: var(--xennone-hover); }
.reco:not(.primary) .reco-label { color: var(--slate); }
.reco-text { font-size: 13px; line-height: 1.5; color: var(--navy); }
.reco-actions { margin-top: 10px; display: flex; align-items: center; gap: 8px; }

/* --------- Sources grid --------- */
.sources { display: grid; grid-template-columns: repeat(6, 1fr); }
.source-cell {
  padding: 16px; border-left: 1px solid var(--mist);
}
.source-cell:first-child { border-left: 0; }
.source-cell:nth-child(7) { border-left: 0; border-top: 1px solid var(--mist); }
.source-cell:nth-child(n+7) { border-top: 1px solid var(--mist); }
.source-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.source-name { font-size: 13px; font-weight: 500; }
.source-count { font-size: 12px; color: rgba(61,61,82,0.6); }
.source-sync { font-size: 10px; color: rgba(61,61,82,0.5); margin-top: 4px; }
.source-link { font-size: 10px; color: var(--xennone); margin-top: 4px; cursor: pointer; }
.source-link:hover { text-decoration: underline; }
.source-name.muted { color: rgba(61,61,82,0.6); }

/* --------- Footer --------- */
.foot {
  margin-top: 24px; display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: rgba(61,61,82,0.6);
}
.foot-right { display: flex; align-items: center; gap: 16px; }
.foot-mono { font-family: var(--font-mono); color: var(--navy); }

/* --------- Search page --------- */
.search-hero {
  background: var(--white); border-bottom: 1px solid var(--mist);
  padding: 32px;
}
.search-hero-inner { max-width: 720px; }
.search-hero h1 { font-size: 20px; }
.search-hero-sub { font-size: 13px; color: rgba(61,61,82,0.7); margin-top: 4px; }
.search-box { margin-top: 16px; position: relative; }
.search-box-icon { position: absolute; left: 14px; top: 15px; color: rgba(61,61,82,0.5); }
.search-box input {
  width: 100%; padding: 14px 128px 14px 44px;
  border-radius: 10px; border: 1px solid var(--mist);
  background: rgba(244,231,215,0.4); font-size: 15px;
  outline: none;
}
.search-box input:focus { background: var(--white); border-color: var(--xennone); box-shadow: 0 0 0 3px rgba(31,138,50,0.15); }
.search-box-actions { position: absolute; right: 10px; top: 10px; display: flex; align-items: center; gap: 4px; }
.search-filters { margin-top: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.search-filters-label { color: rgba(61,61,82,0.6); margin-right: 4px; }
.pill { padding: 4px 10px; border-radius: 999px; background: var(--white); border: 1px solid var(--mist); color: var(--slate); }
.pill:hover { background: var(--cream); }
.pill.active { background: rgba(31,138,50,0.1); border-color: rgba(31,138,50,0.25); color: var(--xennone); font-weight: 600; }
.sep-v { color: rgba(61,61,82,0.4); margin: 0 4px; }

.results-wrap { max-width: 720px; }
.results-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.results-count { font-size: 13px; color: var(--slate); }
.results-count strong { color: var(--navy); }

.synth {
  padding: 20px; border-radius: 12px; margin-bottom: 24px;
  background: var(--xennone-soft); border: 1px solid var(--xennone-border);
}
.synth-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.synth-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--xennone-hover); }
.synth-meta { margin-left: auto; font-size: 10px; color: rgba(61,61,82,0.6); }
.synth-text { font-size: 14px; line-height: 1.65; color: var(--navy); }
.synth-text a { color: var(--xennone-hover); text-decoration: underline; }
.synth-actions { margin-top: 16px; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.synth-actions .cost { margin-left: auto; color: rgba(61,61,82,0.6); }

.result { padding: 20px; margin-bottom: 12px; }
.result:hover { border-color: rgba(31,138,50,0.4); }
.result-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.result-title { font-size: 15px; font-weight: 600; color: var(--navy); }
.result-date { margin-left: auto; font-size: 10px; color: rgba(61,61,82,0.5); }
.result-snip { font-size: 13px; color: var(--slate); margin-top: 6px; line-height: 1.55; }
.result-snip mark { background: rgba(31,138,50,0.2); color: var(--navy); font-weight: 600; padding: 0 2px; border-radius: 2px; }
.result-meta { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 11px; color: rgba(61,61,82,0.6); }
.result-meta .sep { opacity: 0.5; }
.match { color: var(--sage); font-weight: 500; }
.warn { color: var(--amber); font-weight: 500; }

.pager { margin-top: 24px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; }
.pager-current { color: rgba(61,61,82,0.6); margin: 0 8px; }

.session-fp {
  margin-top: 24px; padding: 16px; background: var(--white);
  border: 1px solid var(--mist); border-radius: 12px;
}
.session-fp-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.session-fp-hd { display: flex; align-items: center; gap: 8px; }
.session-fp-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--navy); }
.session-fp-stats { display: flex; align-items: center; gap: 24px; font-variant-numeric: tabular-nums; color: var(--slate); }

/* --------- Footprint page --------- */
.fp-hdr {
  background: var(--white); border-bottom: 1px solid var(--mist);
  padding: 24px 32px;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.fp-hdr h1 { font-size: 20px; }
.fp-hdr-sub { font-size: 13px; color: rgba(61,61,82,0.7); margin-top: 4px; }
.fp-hdr-actions { display: flex; align-items: center; gap: 8px; }
.timerange { display: inline-flex; padding: 3px; border-radius: 6px; background: rgba(244,231,215,0.6); border: 1px solid var(--mist); font-size: 12px; }
.timerange button { padding: 5px 10px; border-radius: 4px; color: var(--slate); }
.timerange button:hover { background: var(--white); }
.timerange button.active { background: var(--white); color: var(--navy); font-weight: 500; box-shadow: var(--shadow-sm); }

.fp-hero { padding: 24px; }
.fp-hero-row { display: flex; align-items: flex-start; justify-content: space-between; }
.fp-hero-num { font-size: 44px; font-weight: 600; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.02em; }
.fp-hero-unit { font-size: 17px; color: rgba(61,61,82,0.7); font-weight: 500; }
.fp-hero-sub { font-size: 12px; color: rgba(61,61,82,0.6); margin-top: 8px; }
.fp-hero-delta { display: inline-flex; align-items: center; gap: 4px; color: var(--sage); font-weight: 500; }
.prov-block { text-align: right; }
.prov-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(61,61,82,0.5); margin-bottom: 4px; }
.prov-row { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 12px; }
.prov-row + .prov-row { margin-top: 4px; }

.sparkline { margin-top: 24px; }
.sparkline svg { width: 100%; height: 56px; }
.sparkline-axis { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: rgba(61,61,82,0.5); margin-top: 4px; }

.stack-list { margin-top: 20px; }
.stack-item { }
.stack-item + .stack-item { margin-top: 8px; }
.stack-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; margin-bottom: 3px; }
.stack-name { color: var(--slate); }
.stack-val { font-variant-numeric: tabular-nums; font-weight: 500; }
.stack-bar { height: 6px; background: var(--mist); border-radius: 999px; overflow: hidden; }
.stack-bar > div { height: 100%; border-radius: 999px; }

.est-note { font-size: 10px; color: rgba(61,61,82,0.5); margin-top: 12px; }
.est-note .star { color: var(--amber); }

/* Region table */
.tbl { width: 100%; font-size: 13px; border-collapse: collapse; }
.tbl thead th {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(61,61,82,0.6); font-weight: 600; padding: 4px 12px 10px; text-align: left;
}
.tbl thead th.r { text-align: right; }
.tbl tbody td { padding: 12px; border-top: 1px solid var(--mist); font-variant-numeric: tabular-nums; color: var(--navy); }
.tbl tbody td.r { text-align: right; }
.tbl tbody td.first { padding-left: 20px; }
.tbl tbody td.last { padding-right: 20px; }
.tbl tbody tr.total { background: rgba(244,231,215,0.4); }
.tbl tbody tr.total td { font-weight: 600; }
.mono { font-family: var(--font-mono); font-size: 12px; }
.tag { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.tag.amber { background: rgba(196,124,43,0.15); color: var(--amber); }

.reco-card {
  padding: 20px; border-radius: 12px;
  background: var(--xennone-soft); border: 1px solid var(--xennone-border);
}
.reco-card-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.reco-card-title { font-size: 15px; font-weight: 600; color: var(--navy); }
.reco-card-desc { font-size: 13px; line-height: 1.55; color: var(--navy); margin-top: 8px; }
.reco-card-list { margin-top: 16px; }
.reco-card-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.reco-card-row + .reco-card-row { margin-top: 8px; }
.reco-card-actions { margin-top: 16px; display: flex; gap: 8px; }
.reco-card-actions .btn-primary { flex: 1; justify-content: center; }

/* Chart card */
.chart-card { padding: 20px; }
.chart-legend { display: flex; align-items: center; gap: 16px; font-size: 12px; }
.chart-legend label { display: inline-flex; align-items: center; gap: 6px; }
.chart-note { font-size: 10px; color: rgba(61,61,82,0.5); margin-top: 8px; }
.chart-note a { text-decoration: underline; }

/* Utility */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.ml-auto { margin-left: auto; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.text-xs { font-size: 11px; }
.text-slate { color: var(--slate); }
.text-muted { color: rgba(61,61,82,0.6); }
.text-xennone { color: var(--xennone); }
.text-xennone-hover { color: var(--xennone-hover); }
.text-sage { color: var(--sage); }
.text-amber { color: var(--amber); }
.text-coral { color: var(--coral); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.tabular { font-variant-numeric: tabular-nums lining-nums; }

/* Focus ring */
*:focus-visible {
  outline: 2px solid var(--xennone);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------- Page header helpers (Timeline / Sources / Recos / Settings / Admin) --------- */
.page-hdr {
  background: var(--white); border-bottom: 1px solid var(--mist);
  padding: 24px 32px; display: flex; align-items: flex-start; justify-content: space-between;
}
.page-hdr h1 { font-size: 20px; }
.page-hdr-sub { font-size: 13px; color: rgba(61,61,82,0.7); margin-top: 4px; }
.page-hdr-actions { display: flex; align-items: center; gap: 8px; }

/* --------- Entity pills (Timeline filter) --------- */
.entity-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.entity-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--mist);
  background: var(--white); font-size: 12px; font-weight: 500; color: var(--slate);
}
.entity-pill:hover { background: var(--cream); }
.entity-pill.active { background: rgba(31,138,50,0.1); border-color: rgba(31,138,50,0.3); color: var(--xennone-hover); }

/* --------- Timeline --------- */
.tl-track { position: relative; padding: 8px 0 8px 28px; }
.tl-track::before { content: ''; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--mist); }
.tl-day { margin-bottom: 28px; }
.tl-day-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(61,61,82,0.55); margin-bottom: 12px; position: relative;
}
.tl-item { position: relative; padding: 12px 16px; margin-bottom: 10px; background: var(--white); border: 1px solid var(--mist); border-radius: 10px; }
.tl-item::before {
  content: ''; position: absolute; left: -23px; top: 18px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--xennone); border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--xennone-border);
}
.tl-item-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-item-title { font-size: 13px; font-weight: 600; color: var(--navy); }
.tl-item-time { margin-left: auto; font-size: 10px; color: rgba(61,61,82,0.5); }
.tl-item-desc { font-size: 12px; color: var(--slate); margin-top: 4px; line-height: 1.55; }

/* --------- Settings --------- */
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--slate); }
.settings-nav a:hover { background: var(--cream-2); color: var(--navy); }
.settings-nav a.active { background: var(--xennone-soft); color: var(--xennone-hover); font-weight: 600; }
.field-row { padding: 16px 20px; border-top: 1px solid var(--mist); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.field-row:first-child { border-top: 0; }
.field-label { font-size: 13px; font-weight: 500; color: var(--navy); }
.field-desc { font-size: 11px; color: rgba(61,61,82,0.6); margin-top: 2px; }
.field-input { padding: 8px 12px; border-radius: 6px; border: 1px solid var(--mist); background: var(--cream); font-size: 13px; font-family: var(--font-mono); min-width: 260px; color: var(--slate); }
.toggle { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--mist); flex: 0 0 40px; cursor: pointer; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); transition: left 0.15s; }
.toggle.on { background: var(--xennone); }
.toggle.on::after { left: 20px; }

/* --------- Admin --------- */
.audit-row { display: grid; grid-template-columns: 110px 1fr 140px 120px; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--mist); font-size: 12px; align-items: center; }
.audit-row:first-child { border-top: 0; }
.audit-actor { font-weight: 500; color: var(--navy); }
.role-badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.role-badge.portfolio { background: rgba(31,138,50,0.15); color: var(--xennone-hover); }
.role-badge.admin { background: rgba(74,111,165,0.15); color: var(--steel); }
.banner {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 10px;
  background: var(--xennone-soft); border: 1px solid var(--xennone-border); font-size: 12px; color: var(--navy); margin-bottom: 20px; line-height: 1.5;
}
.banner.amber { background: rgba(196,124,43,0.1); border-color: rgba(196,124,43,0.3); }

/* --------- Empty state --------- */
.empty-state { padding: 48px 24px; text-align: center; color: rgba(61,61,82,0.6); }
.empty-state svg { margin: 0 auto 12px; opacity: 0.4; }
.empty-state-title { font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.empty-state-sub { font-size: 12px; }

/* ============================================================
   getxennent.com — marketing / login gateway (namespaced .lp-)
   ============================================================ */
.lp-body { background: var(--cream); min-height: 100vh; }
.lp-nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 48px; max-width: 1280px; margin: 0 auto; }
.lp-nav-links { display: flex; align-items: center; gap: 28px; font-size: 13px; font-weight: 500; color: var(--slate); }
.lp-nav-links a:hover { color: var(--navy); }
.lp-nav-cta { display: flex; align-items: center; gap: 10px; }

.lp-hero { max-width: 780px; margin: 0 auto; text-align: center; padding: 72px 24px 48px; }
.lp-hero-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--mist); font-size: 11px; font-weight: 600;
  color: var(--xennone-hover); letter-spacing: 0.03em; margin-bottom: 20px;
}
.lp-hero h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--navy); }
.lp-hero p { font-size: 16px; color: var(--slate); margin-top: 16px; line-height: 1.6; max-width: 560px; margin-left: auto; margin-right: auto; }
.lp-hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }

.lp-metrics { max-width: 1000px; margin: 0 auto 64px; padding: 0 24px; }
.lp-metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-metric-card { background: var(--white); border: 1px solid var(--mist); border-radius: 14px; padding: 22px 20px; text-align: center; }
.lp-metric-num { font-size: 28px; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; font-family: var(--font-mono); }
.lp-metric-label { font-size: 11px; color: rgba(61,61,82,0.65); margin-top: 6px; line-height: 1.4; }
.lp-metrics-note { text-align: center; font-size: 11px; color: rgba(61,61,82,0.5); margin-top: 14px; }

.lp-section { max-width: 1100px; margin: 0 auto; padding: 56px 24px; }
.lp-section-hd { text-align: center; margin-bottom: 32px; }
.lp-section-hd h2 { font-size: 24px; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; }
.lp-section-hd p { font-size: 14px; color: var(--slate); margin-top: 8px; }

.lp-apps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-app-tile { background: var(--white); border: 1px solid var(--mist); border-radius: 16px; padding: 24px 20px; }
.lp-app-tile.disabled { opacity: 0.55; }
.lp-app-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-family: var(--font-sans); font-weight: 700; color: var(--white); font-size: 15px; }
.lp-app-name { font-size: 15px; font-weight: 600; color: var(--navy); }
.lp-app-family { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(61,61,82,0.55); margin-top: 2px; }
.lp-app-desc { font-size: 12px; color: var(--slate); margin-top: 10px; line-height: 1.5; }
.lp-app-status { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; margin-top: 14px; padding: 3px 9px; border-radius: 999px; }
.lp-app-status.live { background: var(--xennone-soft); color: var(--xennone-hover); }
.lp-app-status.soon { background: var(--mist); color: rgba(61,61,82,0.65); }

.lp-pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-price-card { background: var(--white); border: 1px solid var(--mist); border-radius: 16px; padding: 28px 24px; }
.lp-price-card.featured { border-color: var(--xennone-border); box-shadow: 0 8px 24px rgba(31,138,50,0.1); position: relative; }
.lp-price-tag { position: absolute; top: -10px; right: 20px; background: var(--xennone); color: var(--white); font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.lp-price-name { font-size: 13px; font-weight: 600; color: rgba(61,61,82,0.7); text-transform: uppercase; letter-spacing: 0.04em; }
.lp-price-num { font-size: 30px; font-weight: 700; color: var(--navy); margin-top: 8px; }
.lp-price-num span { font-size: 13px; font-weight: 500; color: rgba(61,61,82,0.6); }
.lp-price-desc { font-size: 12px; color: var(--slate); margin-top: 6px; }
.lp-price-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.lp-price-list div { font-size: 12px; color: var(--slate); display: flex; align-items: flex-start; gap: 8px; }

.lp-login-panel { max-width: 380px; margin: 0 auto; background: var(--white); border: 1px solid var(--mist); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.lp-login-panel h2 { font-size: 18px; text-align: center; margin-bottom: 4px; }
.lp-login-panel p { font-size: 12px; text-align: center; color: rgba(61,61,82,0.65); margin-bottom: 20px; }
.lp-input { width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--mist); background: var(--cream); font-size: 13px; margin-bottom: 10px; font-family: var(--font-sans); }
.lp-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; font-size: 11px; color: rgba(61,61,82,0.5); }
.lp-divider::before, .lp-divider::after { content: ''; flex: 1; height: 1px; background: var(--mist); }
.lp-oauth-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 9px; border-radius: 8px; border: 1px solid var(--mist); background: var(--white); font-size: 12px; font-weight: 500; color: var(--navy); margin-bottom: 8px; }
.xennone-login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.xennone-login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; }
.xennone-login-brand .sb-logo { width: 30px; height: 30px; }
.xennone-login-error { color: var(--coral); min-height: 18px; margin: 0 0 10px !important; text-align: left !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.lp-footer { border-top: 1px solid var(--mist); padding: 32px 48px; max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: rgba(61,61,82,0.6); }

@media (max-width: 900px) {
  .lp-metrics-grid, .lp-apps-grid, .lp-pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
