/* The brand brain: components. Tokens are in tokens.css. Dark night sky by default, light by toggle. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14.5px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
a { color: var(--moon); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img, svg { display: block; }
.icon { display: inline-block; flex: none; vertical-align: -0.15em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
code, kbd, .mono { font-family: var(--font-mono); font-size: 0.86em; }
code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
kbd {
  display: inline-block; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text-2); font-size: 11px; line-height: 16px;
}
::selection { background: var(--moon-bg-2); }
:focus-visible { outline: 2px solid var(--moon-2); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ night sky */
.sky {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1px 1px at 28% 72%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1.4px 1.4px at 46% 34%, rgba(214,226,255,.6), transparent 60%),
    radial-gradient(1px 1px at 63% 12%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1px 1px at 72% 58%, rgba(255,255,255,.3), transparent 60%),
    radial-gradient(1.2px 1.2px at 86% 26%, rgba(214,226,255,.5), transparent 60%),
    radial-gradient(1px 1px at 92% 82%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 8% 88%, rgba(255,255,255,.3), transparent 60%),
    radial-gradient(1px 1px at 38% 92%, rgba(255,255,255,.25), transparent 60%),
    radial-gradient(1px 1px at 55% 50%, rgba(255,255,255,.2), transparent 60%),
    radial-gradient(900px 600px at 85% -10%, rgba(80, 110, 200, .16), transparent 70%),
    radial-gradient(700px 500px at -10% 110%, rgba(90, 70, 180, .10), transparent 70%);
}
:root[data-theme="light"] .sky {
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(47, 82, 184, .07), transparent 70%),
    radial-gradient(700px 500px at -10% 110%, rgba(122, 82, 214, .05), transparent 70%);
}

/* ------------------------------------------------------------------ shell */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--s-4);
  padding: 20px 14px 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-2) 92%, transparent), color-mix(in srgb, var(--bg) 92%, transparent));
  border-right: 1px solid var(--line);
}
.sidebar__top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.brand-mark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand-mark:hover { text-decoration: none; }
.brand-mark__text em { font-style: normal; color: var(--text-3); font-weight: 500; font-size: .78em; letter-spacing: .01em; }
.moon {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 35%, #f4f7ff, var(--moon) 55%, var(--moon-2));
  box-shadow: 0 0 18px rgba(188, 208, 255, .45), inset -5px -3px 0 rgba(6, 10, 20, .28);
}
:root[data-theme="light"] .moon { background: radial-gradient(circle at 35% 35%, #8ea8ff, var(--moon) 60%); box-shadow: inset -5px -3px 0 rgba(255,255,255,.25); }

.brain-switch {
  display: grid; gap: 1px; padding: 12px 12px; margin: 4px 0 0;
  border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface);
}
.brain-switch__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); font-weight: 600; }
.brain-switch strong { font-size: 15px; font-weight: 600; }
.brain-switch__all { font-size: 12px; color: var(--text-3); }

.nav { display: grid; gap: 1px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  color: var(--text-2); font-weight: 500; font-size: 13.5px;
}
.nav a .icon { color: var(--text-3); }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.is-active { background: var(--moon-bg); color: var(--text); box-shadow: inset 2px 0 0 var(--moon-2); }
.nav a.is-active .icon { color: var(--moon); }
.nav a .badge { margin-left: auto; }
.nav__sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); font-weight: 600; padding: 14px 10px 4px; }
.sidebar__foot { margin-top: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 6px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.user { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 100%; }
.user__avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--moon-bg-2); color: var(--moon); font-weight: 600; font-size: 11px; flex: none; }
.user__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.sidebar__link { color: var(--text-3); }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; padding: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.theme-toggle { margin-left: auto; }
.icon-btn.nav-toggle { display: none; }
.theme-toggle__light { display: none; }
:root[data-theme="light"] .theme-toggle__light { display: inline; }
:root[data-theme="light"] .theme-toggle__dark { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 12px 40px; background: var(--glass); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.search-trigger {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text-3);
  font: inherit; font-size: 13.5px; cursor: pointer; text-align: left;
}
.search-trigger span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-trigger:hover { border-color: var(--line-3); color: var(--text-2); }
.topbar__ask { margin-left: auto; }

.content { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 32px 40px 80px; }
.content.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; }
.content__main { min-width: 0; }

/* ------------------------------------------------------------------ base components */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  padding: 22px 24px;
}
:root[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(20, 30, 60, .04); }
.card--flat { padding: 0; overflow: hidden; }
.grid { display: grid; gap: var(--s-4); }
.stack { display: grid; gap: var(--s-3); align-content: start; }
.stack-lg { display: grid; gap: 20px; align-content: start; min-width: 0; }
.row { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--moon-2); font-weight: 600; margin-bottom: 8px; }
.display { font-family: var(--font-read); font-weight: 600; font-size: 44px; line-height: 1.08; letter-spacing: -0.02em; }
.lead { font-size: 17px; color: var(--text-2); max-width: 620px; margin-top: 12px; line-height: 1.55; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap; line-height: 1;
  background: var(--surface-3); color: var(--text-2); border: 1px solid transparent;
}
.chip--good { background: var(--good-bg); color: var(--good); }
.chip--warn { background: var(--warm-bg); color: var(--warm); }
.chip--bad { background: var(--bad-bg); color: var(--bad); }
.chip--moon { background: var(--moon-bg); color: var(--moon); }
.chip--muted { background: var(--surface-3); color: var(--text-3); }
.chip--status { text-transform: capitalize; height: 20px; font-size: 11px; }
.chip__n { color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip--filter { height: 28px; padding: 0 11px; background: transparent; border-color: var(--line-2); color: var(--text-2); font-size: 12.5px; }
.chip--filter:hover { border-color: var(--line-3); color: var(--text); text-decoration: none; }
.chip--filter.is-on { background: var(--moon-bg); border-color: color-mix(in srgb, var(--moon-2) 45%, transparent); color: var(--text); }
.chip--filter .type-dot { margin: 0; }

.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px;
  background: var(--moon-bg-2); color: var(--moon); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.badge--warm { background: var(--warm-bg); color: var(--warm); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--line-3); text-decoration: none; background: var(--surface-3); }
.btn--primary { background: var(--moon); color: var(--moon-ink); border-color: transparent; font-weight: 600; }
.btn--primary:hover { background: var(--moon-2); }
.btn--ghost { background: transparent; }
.btn--small { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn--block { width: 100%; }

.type-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; margin-right: 7px;
  background: var(--c, var(--text-3)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--text-3)) 18%, transparent);
  vertical-align: 0.05em;
}
.type-dot[data-type="Brand"] { --c: var(--t-Brand); }
.type-dot[data-type="Organization"] { --c: var(--t-Organization); }
.type-dot[data-type="ProductLine"] { --c: var(--t-ProductLine); }
.type-dot[data-type="Product"] { --c: var(--t-Product); }
.type-dot[data-type="Market"] { --c: var(--t-Market); }
.type-dot[data-type="Category"] { --c: var(--t-Category); }
.type-dot[data-type="Topic"] { --c: var(--t-Topic); }
.type-dot[data-type="Event"] { --c: var(--t-Event); }
.type-dot[data-type="Channel"] { --c: var(--t-Channel); }
.type-dot--page { --c: var(--text-3); border-radius: 2px; }

.ent { display: inline-flex; align-items: center; color: var(--text); padding: 3px 9px 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; margin: 0 4px 4px 0; max-width: 100%; min-width: 0; }
.ent span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ent:hover { border-color: var(--line-3); text-decoration: none; }

.kpi { display: grid; gap: 2px; align-content: start; padding: 16px 18px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--surface); color: var(--text); position: relative; overflow: hidden; }
a.kpi:hover { border-color: var(--line-3); text-decoration: none; }
.kpi__value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi__value small { font-size: 16px; color: var(--text-2); margin-left: 1px; }
.kpi__label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi__sub { font-size: 11.5px; color: var(--text-3); }
.meter { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--moon-2), var(--good)); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 11px 14px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.table tr:last-child td { border-bottom: 0; }
.table-note { margin-top: 10px; }

.empty { text-align: center; padding: 48px 24px; display: grid; justify-items: center; gap: 8px; }
.empty h2 { font-size: 18px; }
.empty .btn { margin-top: 10px; }
.empty__moon { width: 54px; height: 54px; border-radius: 50%; margin-bottom: 8px; box-shadow: inset -12px -6px 0 var(--moon); opacity: .8; transform: rotate(-20deg); }
.empty-line { color: var(--text-3); font-size: 13.5px; padding: 6px 0; }
.callout { padding: 10px 14px; border-radius: var(--r-2); margin-top: 12px; }
.callout--bad { background: var(--bad-bg); color: var(--bad); }

.page-head { margin-bottom: 28px; }
.page-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-head__title { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.page-head__title .type-dot { width: 12px; height: 12px; margin-right: 12px; }
.page-head__sub { color: var(--text-2); margin-top: 8px; max-width: 720px; font-size: 15px; }
.crumbs { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; flex-wrap: wrap; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--text); }

.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 7px; color: var(--text-2); font-weight: 500; font-size: 13px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.tabs__n { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.more { font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.more:hover { color: var(--moon); }

/* ------------------------------------------------------------------ citation chip + popover */
.cites { white-space: nowrap; }
.cite {
  display: inline-grid; place-items: center; min-width: 17px; height: 16px; padding: 0 4px; margin: 0 1px 0 2px;
  border-radius: 5px; background: var(--moon-bg); color: var(--moon); border: 1px solid color-mix(in srgb, var(--moon-2) 25%, transparent);
  font: 600 10px/1 var(--font-ui); font-variant-numeric: tabular-nums; vertical-align: 0.35em; text-decoration: none !important;
  cursor: pointer; transition: background .12s, color .12s;
}
.cite:hover, .cite:focus-visible, .cite.is-open { background: var(--moon); color: var(--moon-ink); }
.cite[data-status="proposed"] { border-style: dashed; }
.cite[data-status="outdated"] { opacity: .55; }
.cite[data-status="wrong"], .cite[data-status="rejected"] { opacity: .55; text-decoration: line-through; }
.cite.is-missing { background: var(--surface-3); color: var(--text-3); border-color: var(--line); cursor: help; }
.cite-pop {
  position: absolute; z-index: 100; width: min(360px, calc(100vw - 24px)); padding: 14px 16px 12px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
  font-size: 13px; color: var(--text); opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .12s, transform .12s;
}
.cite-pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.cite-pop__quote { font: 400 15px/1.5 var(--font-read); color: var(--text); margin: 0 0 10px; quotes: "“" "”"; }
.cite-pop__quote::before { content: open-quote; color: var(--moon-2); }
.cite-pop__quote::after { content: close-quote; color: var(--moon-2); }
.cite-pop__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-3); font-size: 12px; }
.cite-pop__host { color: var(--text-2); font-weight: 500; }
.cite-pop__open { margin-left: auto; font-weight: 500; }

/* ------------------------------------------------------------------ brains list */
.brains-hero { position: relative; padding: 40px 0 36px; }
.brains-hero__moon {
  position: absolute; right: 4%; top: 10px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #f6f8ff 0%, var(--moon) 45%, var(--moon-2) 100%);
  box-shadow: 0 0 80px rgba(188, 208, 255, .35), inset -26px -14px 0 rgba(6, 10, 20, .35);
  opacity: .9;
}
:root[data-theme="light"] .brains-hero__moon { background: radial-gradient(circle at 38% 36%, #dfe7ff, #a9bdf5 60%); box-shadow: 0 0 60px rgba(47,82,184,.2), inset -26px -14px 0 rgba(255,255,255,.6); }
.brain-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.brain-card { display: grid; gap: 16px; color: var(--text); transition: border-color .15s, transform .15s; }
.brain-card:hover { text-decoration: none; border-color: var(--line-3); transform: translateY(-2px); }
.brain-card__head { display: flex; gap: 14px; align-items: center; }
.brain-card__mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 600 22px var(--font-read); color: var(--moon-ink); background: linear-gradient(135deg, var(--moon), var(--moon-2)); flex: none; }
.brain-card__name { font-size: 20px; }
.brain-card__go { margin-left: auto; color: var(--text-3); }
.brain-card:hover .brain-card__go { color: var(--moon); }
.brain-card__summary { color: var(--text-2); font-family: var(--font-read); font-size: 15.5px; line-height: 1.5; }
.brain-card__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.brain-card__stats div { display: grid; gap: 1px; }
.brain-card__stats dt { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.brain-card__stats dd { margin: 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.brain-card__foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; }

/* ------------------------------------------------------------------ brain home */
.hero {
  overflow: hidden; padding: 34px 36px 28px; margin-bottom: 18px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(142, 170, 240, .14), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
:root[data-theme="light"] .hero { background: radial-gradient(600px 300px at 100% 0%, rgba(47, 82, 184, .08), transparent 70%), var(--surface); }
.hero__sky { position: absolute; inset: 0; pointer-events: none; }
.hero__moon {
  position: absolute; right: 44px; top: 30px; width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #f6f8ff 0%, var(--moon) 45%, var(--moon-2) 100%);
  box-shadow: 0 0 60px rgba(188, 208, 255, .3), inset -16px -8px 0 rgba(6, 10, 20, .32);
}
:root[data-theme="light"] .hero__moon { background: radial-gradient(circle at 38% 36%, #e6ecff, #b3c4f3 70%); box-shadow: inset -16px -8px 0 rgba(255,255,255,.7); }
.hero__body { position: relative; max-width: 720px; }
.hero__name { font-family: var(--font-read); font-size: 46px; line-height: 1.05; letter-spacing: -0.02em; font-weight: 600; }
.hero__summary { margin-top: 12px; font-family: var(--font-read); font-size: 18.5px; line-height: 1.5; color: var(--text-2); max-width: 640px; }
.hero__meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; align-items: center; }
.hero__link { display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); }
.keyfacts {
  position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0;
  margin: 26px 0 0; border-top: 1px solid var(--line);
}
.keyfact { padding: 16px 12px 4px 0; }
.keyfact dd .cite { white-space: nowrap; }
.keyfact + .keyfact { padding-left: 14px; border-left: 1px solid var(--line); }
.keyfact dt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 600; margin-bottom: 4px; }
.keyfact dd { margin: 0; }
.keyfact__value { font-size: 17px; text-wrap: pretty; font-weight: 600; letter-spacing: -0.01em; }
.keyfact__sub { display: flex; gap: 6px; align-items: center; margin-top: 3px; font-size: 12px; color: var(--text-3); }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.overview-card .prose { font-size: 16.5px; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.feed__run { position: relative; padding: 0 0 20px 22px; }
.feed__run::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 1px; background: var(--line-2); }
.feed__run:last-child::before { display: none; }
.feed__run:last-child { padding-bottom: 0; }
.feed__run-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feed__dot { position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--moon); box-shadow: 0 0 0 4px var(--moon-bg); }
.feed__run-title { font-weight: 600; color: var(--text); }
.feed__counts { display: flex; gap: 5px; flex-wrap: wrap; margin-left: auto; }
.feed__digest { margin: 10px 0 6px; font-family: var(--font-read); font-size: 15.5px; line-height: 1.55; color: var(--text-2); padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.feed__items { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.feed__item { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; }
.feed__item a { color: var(--text); }
.feed__item a:hover { color: var(--moon); }
.feed__kind { flex: none; width: 92px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.feed__more a { color: var(--text-3); padding-left: 102px; font-size: 12.5px; }
.feed__kind.chip--new_fact, .chip--kind.chip--new_fact { color: var(--good); }
.feed__kind.chip--conflict, .chip--kind.chip--conflict { color: var(--warm); }
.feed__kind.chip--gone, .chip--kind.chip--gone, .feed__kind.chip--wrong, .feed__kind.chip--rejected { color: var(--bad); }
.feed__kind.chip--new_entity, .chip--kind.chip--new_entity, .feed__kind.chip--accepted { color: var(--moon); }
.feed__kind.chip--changed_value, .chip--kind.chip--changed_value { color: var(--t-Event); }
.chip--kind { height: 20px; font-size: 11px; background: var(--surface-2); border-color: var(--line); }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; }
.quick__item { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; color: var(--text); }
.quick__item:hover { background: var(--surface-2); text-decoration: none; }
.quick__icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--moon-bg); color: var(--moon); flex: none; }
.quick__item strong { display: block; font-size: 13.5px; }
.quick__item small { display: block; color: var(--text-3); font-size: 11.5px; line-height: 1.35; margin-top: 1px; }

.gaps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gap { display: flex; gap: 10px; }
.gap__icon { color: var(--warm); margin-top: 2px; }
.gap p { font-size: 14px; line-height: 1.45; }
.gaps__note { margin-top: 14px; }

.ent-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ent-list li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ent-list .ent { margin: 0; }

.typebars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.typebars li { display: grid; grid-template-columns: 130px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.typebars a { color: var(--text-2); display: flex; align-items: center; }
.typebars a:hover { color: var(--text); text-decoration: none; }
.typebars__bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.typebars__bar span { display: block; height: 100%; background: var(--c); border-radius: 6px; opacity: .85; }
.typebars__n { text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ wiki */
.wiki-head { max-width: 1040px; }
.wiki-title { font-family: var(--font-read); font-size: 40px; line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; }
.wiki-summary { font-family: var(--font-read); font-size: 18.5px; line-height: 1.5; }
.wiki-meta { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; color: var(--text-3); }
.wiki-meta--quiet { margin-top: 10px; }
.meta-item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); }
a.meta-item:hover { color: var(--moon); text-decoration: none; }
.wiki-layout, .entity-layout, .source-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.entity-layout { gap: 28px; }
.source-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
.wiki-article { min-width: 0; max-width: var(--read-max); }
.wiki-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; padding-bottom: 8px; scrollbar-width: thin; }
.side-card { border: 1px solid var(--line); border-radius: var(--r-3); padding: 16px 18px; background: var(--surface); }
.side-card__title { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); font-weight: 600; margin-bottom: 10px; }
.side-card__title--2 { margin-top: 16px; }
.side-note { padding: 0 4px; line-height: 1.5; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.link-list a { color: var(--text); display: flex; align-items: center; }
.link-list a:hover { color: var(--moon); text-decoration: none; }
.link-list--plain a { justify-content: space-between; color: var(--text-2); }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 13px; border-left: 1px solid var(--line-2); }
.toc a { display: block; color: var(--text-2); padding: 1px 0 1px 12px; margin-left: -1px; border-left: 1px solid transparent; }
.toc a:hover { color: var(--text); border-left-color: var(--moon-2); text-decoration: none; }
.toc .toc__l3 a { padding-left: 24px; font-size: 12.5px; }
.nb-group { margin-bottom: 10px; }
.nb-group__label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 5px; }

/* the reading body */
.prose { font-family: var(--font-read); font-size: 17.5px; line-height: 1.7; color: var(--text); font-optical-sizing: auto; }
.prose > * + * { margin-top: 1em; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--font-ui); color: var(--text); position: relative; }
.prose h2 { font-size: 21px; margin-top: 1.9em; padding-bottom: 8px; border-bottom: 1px solid var(--line); letter-spacing: -0.015em; }
.prose h3 { font-size: 17px; margin-top: 1.5em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose > :first-child { margin-top: 0; }
.prose .anchor { margin-left: 8px; color: var(--text-3); opacity: 0; font-weight: 400; transition: opacity .1s; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; text-decoration: none; }
.prose p, .prose li { color: var(--text); }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--text-3); }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--moon-bg-2); color: var(--text-2); font-style: italic; }
.prose a:not(.cite) { color: var(--moon); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--moon) 35%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:not(.cite):hover { text-decoration-color: var(--moon); }
.prose a.wikilink { text-decoration-style: solid; }
.prose a.wikilink.is-missing { color: var(--text-2); text-decoration-style: dotted; text-decoration-color: var(--text-3); }
.prose a.ext::after { content: "↗"; font-size: .75em; margin-left: 2px; color: var(--text-3); }
.prose code { font-size: .8em; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin: 2em 0; }
.prose .table-wrap { margin-top: 1.2em; border: 1px solid var(--line); border-radius: var(--r-2); }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 13.5px; line-height: 1.45; }
.prose th { text-align: left; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.prose th, .prose td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose .cite { font-family: var(--font-ui); }
.prose--compact { font-size: 16.5px; line-height: 1.65; }
.prose--compact h2 { font-size: 16px; margin-top: 1.4em; border: 0; padding: 0; }

.refs { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line-2); }
.refs__title { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); margin-bottom: 14px; }
.refs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.refs__list li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; scroll-margin-top: 90px; }
.refs__list li:target { background: var(--moon-bg); border-radius: 8px; }
.refs__n .cite { vertical-align: 0; margin: 3px 0 0; }
.refs__quote { font-family: var(--font-read); font-size: 14.5px; line-height: 1.5; color: var(--text-2); quotes: "“" "”"; }
.refs__meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--text-3); margin-top: 3px; }

.infobox-top { display: none; }
.infobox { border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); overflow: hidden; padding: 0 0 4px; }
.infobox::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--c, var(--moon)), transparent); }
.infobox__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 0; }
.infobox__type { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); font-weight: 600; display: inline-flex; align-items: center; }
.infobox__title { font-family: var(--font-read); font-size: 22px; padding: 4px 18px 0; }
.infobox__roles { display: flex; gap: 5px; flex-wrap: wrap; padding: 8px 18px 0; }
.infobox__aliases { padding: 6px 18px 0; }
.infobox__facts { margin: 12px 0 0; }
.infobox__row { display: grid; grid-template-columns: 104px 1fr; gap: 10px; padding: 9px 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.infobox__row dt { color: var(--text-3); font-size: 12.5px; }
.infobox__row dd { margin: 0; display: grid; gap: 3px; min-width: 0; }
.infobox__row.has-conflict { background: color-mix(in srgb, var(--warm-bg) 50%, transparent); }
.infobox__val { overflow-wrap: anywhere; }
.infobox__val a { color: var(--text); }
.infobox__val a:hover { color: var(--moon); }
.conflict-flag { color: var(--warm); display: inline-block; vertical-align: -1px; }
.infobox__empty { padding: 12px 18px; }
.infobox__home, .infobox__all { display: flex; align-items: center; gap: 6px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13px; }
.infobox__home { color: var(--text-2); }
.infobox__all { font-weight: 500; }
.val__scope { font-size: 11.5px; color: var(--text-3); margin-left: 3px; white-space: nowrap; }
.dot-status { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-left: 4px; vertical-align: .15em; background: var(--moon-2); }
.dot-status--outdated { background: var(--text-3); }

/* wiki index */
.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-input { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--text-3); }
.filter-input input { border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; width: 170px; }
select, input[type="url"], input[type="text"], input[type="search"] { font: inherit; color: var(--text); }
select { height: 32px; padding: 0 30px 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; background-size: 5px 5px; background-repeat: no-repeat; }
.idx-section__title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); margin-bottom: 12px; display: flex; align-items: center; gap: 4px; }
.idx-section__title .muted { font-weight: 500; margin-left: 4px; }
.idx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.idx-card { display: grid; gap: 4px; padding: 16px 18px; color: var(--text); align-content: start; }
.idx-card:hover { border-color: var(--line-3); text-decoration: none; }
.idx-card strong { font-family: var(--font-read); font-size: 18px; font-weight: 600; }
.idx-card__kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--moon-2); font-weight: 600; }
.idx-card__summary { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.idx-card__meta { color: var(--text-3); font-size: 11.5px; margin-top: 6px; }
.idx-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); overflow: hidden; }
.idx-list li { display: grid; grid-template-columns: minmax(160px, 260px) 1fr auto; gap: 14px; align-items: baseline; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.idx-list li:first-child { border-top: 0; }
.idx-list a { color: var(--text); }
.idx-list a strong { font-weight: 500; }
.idx-list a:hover { color: var(--moon); text-decoration: none; }
.idx-list__summary { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idx-list__meta { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.idx-details summary { cursor: pointer; list-style: none; }
.idx-details summary::-webkit-details-marker { display: none; }
.idx-details summary h2::after { content: "Show"; margin-left: 10px; font-size: 11px; color: var(--moon); text-transform: none; letter-spacing: 0; font-weight: 500; }
.idx-details[open] summary h2::after { content: "Hide"; }
.idx-plain { margin: 10px 0 16px; }
.idx-plain h3 { font-size: 13px; color: var(--text-2); margin-bottom: 6px; display: flex; align-items: center; }
.idx-plain p { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.idx-plain a { color: var(--text-2); }

/* history */
.versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.version { padding: 0; overflow: hidden; }
.version__head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; list-style: none; font-size: 13.5px; }
.version__head::-webkit-details-marker { display: none; }
.version__n { font-family: var(--font-mono); font-weight: 500; color: var(--moon); background: var(--moon-bg); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.version__stat { margin-left: auto; font-family: var(--font-mono); font-size: 12px; }
.add { color: var(--good); }
.del { color: var(--bad); }
.diff { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); background: var(--bg-2); font: 12.5px/1.6 var(--font-mono); overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.diff > span { display: block; padding: 0 18px; }
.diff__add { background: var(--good-bg); color: var(--good); }
.diff__del { background: var(--bad-bg); color: var(--bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.diff__same { color: var(--text-3); }
.diff__hunk { color: var(--moon-2); }
.diff--plain { padding: 12px 18px; color: var(--text-2); }
.diff-none { padding: 12px 18px; }

/* ------------------------------------------------------------------ entity data view */
.pred-group { padding: 0; overflow: hidden; scroll-margin-top: 80px; }
.pred-group:target { border-color: color-mix(in srgb, var(--moon-2) 60%, transparent); box-shadow: 0 0 0 3px var(--moon-bg); }
.pred-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.pred-group__head h2 { font-size: 14.5px; }
.pred-sub { font-size: 13px; color: var(--text-2); padding: 12px 20px 0; scroll-margin-top: 80px; }
.facts { list-style: none; margin: 0; padding: 0; }
.fact { display: grid; grid-template-columns: minmax(140px, 0.9fr) minmax(0, 1.6fr) 200px; gap: 16px; align-items: start; padding: 12px 20px; border-top: 1px solid var(--line); }
.facts .fact:first-child { border-top: 0; }
.fact__value { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.fact__value .ent { font-weight: 500; margin: 0; }
.fact__quote { margin: 0; font-family: var(--font-read); font-size: 14.5px; line-height: 1.5; color: var(--text-2); quotes: "“" "”"; }
.fact__quote::before { content: open-quote; }
.fact__quote::after { content: close-quote; }
.fact__meta { display: grid; justify-items: end; gap: 5px; font-size: 12px; color: var(--text-3); text-align: right; min-width: 0; }
.fact__line { display: flex; align-items: center; gap: 6px; justify-content: flex-end; max-width: 100%; white-space: nowrap; }
.fact__line .cite { vertical-align: 0; }
.fact__src { color: var(--text-2); min-width: 0; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.fact--outdated, .fact--wrong, .fact--rejected { opacity: .5; }
.fact--outdated .fact__value, .fact--wrong .fact__value, .fact--rejected .fact__value { text-decoration: line-through; text-decoration-color: var(--text-3); }
.fact--conflict { background: color-mix(in srgb, var(--warm-bg) 45%, transparent); }
.conflicts { border-color: color-mix(in srgb, var(--warm) 35%, transparent); }
.conflicts h2 { color: var(--warm); }
.conflict + .conflict { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.conflict__label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 600; margin-bottom: 10px; }
.conflict__sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.conflict__side { display: grid; gap: 8px; align-content: start; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.conflict__value { font-size: 20px; font-weight: 600; }
.conflict__side blockquote { margin: 0; font-family: var(--font-read); color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.conflict__vs { align-self: center; color: var(--text-3); font-size: 12px; font-weight: 600; text-transform: uppercase; }

/* ------------------------------------------------------------------ search */
.bigsearch { display: flex; align-items: center; gap: 12px; max-width: 760px; height: 54px; padding: 0 8px 0 18px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-3); }
.bigsearch:focus-within { border-color: var(--moon-2); box-shadow: 0 0 0 4px var(--moon-bg); }
.bigsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 17px; }
.search-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.group-title { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); margin-bottom: 10px; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.result { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 5px; }
.result__title { font-size: 15px; font-weight: 600; color: var(--text); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
a.result__title:hover { color: var(--moon); text-decoration: none; }
.result__title a { color: var(--text); display: inline-flex; align-items: center; }
.result__snippet { font-family: var(--font-read); font-size: 15px; color: var(--text-2); line-height: 1.5; }
.result__snippet mark, .cmdk mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.result__quote { font-family: var(--font-read); font-size: 14.5px; color: var(--text-2); quotes: "“" "”"; }
.result__meta { font-size: 12px; color: var(--text-3); }
.results--compact .result { padding: 10px 14px; }

/* ------------------------------------------------------------------ sources */
.add-source { margin-bottom: 22px; }
.add-source__main { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.field { display: grid; gap: 6px; }
.field--grow { flex: 1 1 320px; }
.field__label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field select { height: 38px; }
.field--check { display: flex; align-items: center; gap: 7px; height: 38px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.field--check input { accent-color: var(--moon-2); width: 16px; height: 16px; }
.input-icon { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--bg-2); color: var(--text-3); }
.input-icon:focus-within { border-color: var(--moon-2); box-shadow: 0 0 0 3px var(--moon-bg); }
.input-icon input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%; font-size: 14px; }
.add-source__main .btn { height: 38px; }
.add-source__alt { margin-top: 12px; }
.file-pick { display: inline-flex; align-items: center; gap: 5px; color: var(--moon); cursor: pointer; font-weight: 500; }
.file-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-pick.has-file { color: var(--good); }
.jobs { display: grid; gap: 8px; }
.jobs:not(:empty) { margin-top: 16px; }
.job { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); animation: job-in .25s ease-out; }
.job__icon { width: 22px; display: grid; place-items: center; color: var(--moon); flex: none; }
.job--done .job__icon { color: var(--good); }
.job--failed .job__icon, .job--invalid .job__icon { color: var(--bad); }
.job--failed, .job--invalid { border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.job__body { display: grid; min-width: 0; flex: 1; gap: 1px; }
.job__what { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job__status { color: var(--text-2); }
@keyframes job-in { from { opacity: 0; transform: translateY(-4px); } }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--moon-bg-2); border-top-color: var(--moon); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sources-table td { font-size: 13px; }
.src-cell { max-width: 520px; }
.src-cell__title { color: var(--text); font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-cell__host { display: flex; align-items: center; gap: 5px; color: var(--text-3); font-size: 12px; margin-top: 2px; }
.watch { color: var(--moon); display: inline-flex; }
.chip[class*="chip--kind-"] { background: var(--surface-3); color: var(--text-2); }
.chip--kind-own_site { background: var(--moon-bg) !important; color: var(--moon) !important; }
.chip--kind-competitor_site { background: color-mix(in srgb, var(--t-Organization) 14%, transparent) !important; color: var(--t-Organization) !important; }
.chip--kind-retailer { background: color-mix(in srgb, var(--t-Channel) 16%, transparent) !important; }
.chip--kind-press { background: color-mix(in srgb, var(--t-Event) 14%, transparent) !important; color: var(--t-Event) !important; }
.chip--kind-review { background: var(--warm-bg) !important; color: var(--warm) !important; }

/* source view */
.source-title { font-size: 26px; word-break: break-word; }
.src-url { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snapshot { padding: 0; overflow: hidden; }
.snapshot__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.snapshot__head h2 { font-size: 15px; }
.snapshot__text { padding: 22px 26px 28px; font-family: var(--font-read); font-size: 16px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); max-height: none; }
.snapshot__text mark.q { color: var(--text); background: var(--mark); border-bottom: 2px solid var(--mark-line); border-radius: 3px; padding: 1px 0; scroll-margin-top: 140px; transition: background .2s, box-shadow .2s; }
.snapshot__text mark.q--proposed { background: var(--moon-bg-2); border-bottom-color: var(--moon-2); }
.snapshot__text mark.q--outdated, .snapshot__text mark.q--wrong, .snapshot__text mark.q--rejected { background: var(--surface-3); border-bottom-color: var(--text-3); }
.snapshot__text mark.q:target, .snapshot__text mark.q.is-target { background: var(--warm); color: #1a1205; box-shadow: 0 0 0 3px var(--warm-bg); }
.snapshot__text--code { font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; }
.mark-anchor { scroll-margin-top: 140px; }
.src-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.src-fact { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; padding: 8px; margin: 0 -8px; border-radius: 8px; }
.src-fact:hover, .src-fact.is-active { background: var(--surface-2); }
.src-fact__jump { display: grid; gap: 2px; color: var(--text); min-width: 0; font-size: 13px; }
.src-fact__jump:hover { text-decoration: none; }
.src-fact__subject { display: flex; align-items: center; font-weight: 500; }
.src-fact__pv { color: var(--text-2); overflow-wrap: anywhere; }
.src-fact__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.src-fact.is-unmarked .src-fact__jump { opacity: .6; }
.versions-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.versions-mini li { display: flex; gap: 10px; align-items: baseline; padding-left: 12px; }
.versions-mini li.is-current a { font-weight: 600; color: var(--text); }
.versions-mini li.is-current { position: relative; }
.versions-mini li.is-current::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--moon); }

/* ------------------------------------------------------------------ Cmd-K palette */
.cmdk-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(2, 5, 12, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .12s ease-out; }
:root[data-theme="light"] .cmdk-backdrop { background: rgba(20, 30, 60, .25); }
@keyframes fade { from { opacity: 0; } }
.cmdk { width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow), 0 0 0 1px rgba(0,0,0,.2); overflow: hidden; animation: pop .14s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.99); } }
.cmdk__input { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 56px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.cmdk__input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16.5px; }
.cmdk__list { overflow-y: auto; padding: 8px; }
.cmdk__group { padding: 10px 10px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: var(--text-3); }
.cmdk__item { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; color: var(--text); cursor: pointer; }
.cmdk__item:hover { text-decoration: none; }
.cmdk__item.is-active { background: var(--moon-bg); }
.cmdk__ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); flex: none; }
.cmdk__ico .type-dot { margin: 0; }
.cmdk__item.is-active .cmdk__ico { color: var(--moon); }
.cmdk__txt { display: grid; min-width: 0; gap: 1px; }
.cmdk__title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk__sub { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk__go { margin-left: auto; color: var(--text-3); font-size: 11px; opacity: 0; }
.cmdk__item.is-active .cmdk__go { opacity: 1; }
.cmdk__foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--text-3); background: var(--surface-2); }
.cmdk__empty { padding: 28px 16px; text-align: center; color: var(--text-3); font-size: 13.5px; }

/* ------------------------------------------------------------------ login + error */
.page-login .login { position: relative; z-index: 1; min-height: 100vh; overflow: hidden; display: grid; place-items: center; padding: 24px 16px; }
.login__moon { position: absolute; top: 14vh; left: 50%; margin-left: 90px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 38% 36%, #f6f8ff 0%, var(--moon) 45%, var(--moon-2) 100%); box-shadow: 0 0 90px rgba(188, 208, 255, .35), inset -22px -12px 0 rgba(6, 10, 20, .35); }
.login__card { position: relative; width: min(400px, 100%); padding: 34px 30px; display: grid; gap: 12px; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.login__title { font-family: var(--font-read); font-size: 34px; }
.login__google { margin-top: 12px; height: 44px; }
.login__note { text-align: center; }
.error-page { text-align: center; padding: 10vh 0; display: grid; justify-items: center; gap: 10px; }
.error-page .row { justify-content: center; margin-top: 18px; }
.error-page__moon { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; background: radial-gradient(circle at 38% 36%, #f6f8ff 0%, var(--moon) 45%, var(--moon-2) 100%); box-shadow: 0 0 70px rgba(188, 208, 255, .3), inset -20px -10px 0 rgba(6, 10, 20, .3); }
.error-page__moon span { font: 600 26px var(--font-read); color: var(--moon-ink); opacity: .7; transform: translateX(-8px); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .wiki-layout, .entity-layout, .source-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .content.has-aside { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; z-index: 40; height: auto; max-height: 100vh; padding: 10px 16px; gap: 10px;
    border-right: 0; border-bottom: 1px solid var(--line); background: var(--glass);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .sidebar__top { padding: 0; }
  .icon-btn.nav-toggle { display: inline-grid; }
  .sidebar .brain-switch, .sidebar .nav, .sidebar .sidebar__foot { display: none; }
  body.nav-open .sidebar .brain-switch, body.nav-open .sidebar .nav { display: grid; }
  body.nav-open .sidebar .sidebar__foot { display: flex; }
  body.nav-open .sidebar { overflow-y: auto; }
  .topbar { top: 53px; padding: 10px 16px; }
  .content { padding: 22px 16px 64px; }
  .wiki-layout, .entity-layout, .source-layout { grid-template-columns: minmax(0, 1fr); }
  .wiki-side { position: static; max-height: none; overflow: visible; }
  .infobox-top { display: block; margin-bottom: 24px; }
  .infobox-side, .wiki-layout .wiki-side .toc, .wiki-layout .wiki-side .side-note { display: none; }
  .search-grid { grid-template-columns: minmax(0, 1fr); }
  .brains-hero__moon { width: 90px; height: 90px; right: 0; top: 24px; }
  .login__moon { margin-left: 40px; width: 90px; height: 90px; top: 8vh; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .display { font-size: 34px; }
  .hero { padding: 24px 20px 18px; }
  .hero__moon { width: 54px; height: 54px; right: 18px; top: 18px; }
  .hero__name { font-size: 34px; padding-right: 60px; }
  .hero__summary { font-size: 16.5px; }
  .keyfacts { grid-template-columns: 1fr 1fr; }
  .keyfact, .keyfact + .keyfact { padding: 12px 10px 8px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .keyfact:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi__value { font-size: 23px; }
  .card { padding: 18px 16px; }
  .card.pred-group, .card.snapshot, .card.version, .card.card--flat { padding: 0; }
  .quick.card { padding: 8px; }
  .pred-group__head { padding: 12px 16px; }
  .quick { grid-template-columns: 1fr; }
  .feed__item { flex-direction: column; gap: 1px; }
  .feed__kind { width: auto; }
  .feed__more a { padding-left: 0; }
  .feed__counts { margin-left: 0; }
  .typebars li { grid-template-columns: 110px 1fr 36px; }
  .page-head__title { font-size: 25px; }
  .wiki-title { font-size: 31px; }
  .wiki-summary { font-size: 16.5px; }
  .prose { font-size: 16.5px; }
  .fact { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 16px; }
  .fact__meta { justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; gap: 10px; }
  .conflict__sides { grid-template-columns: minmax(0, 1fr); }
  .conflict__vs { justify-self: center; }
  .idx-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .idx-list__summary { display: none; }
  .filter-input input { width: 120px; }
  .topbar__ask span { display: none; }
  .search-trigger kbd { display: none; }
  .brain-card__stats { grid-template-columns: repeat(2, 1fr); }
  .snapshot__text { padding: 16px; font-size: 15px; }
  .page-head--row { display: block; }
  .bigsearch { height: 48px; }
  .bigsearch .btn { display: none; }
  .sources-table th:nth-child(5), .sources-table td:nth-child(5), .sources-table th:nth-child(6), .sources-table td:nth-child(6) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================================================================== polish (real data) */
/* brain home: key facts */
.keyfact__sub:empty { display: none; }
.keyfact__more { display: inline-flex; align-items: center; gap: 3px; color: var(--text-3); border-bottom: 1px dotted var(--line-3); line-height: 1.2; }
.keyfact__more:hover { color: var(--moon); text-decoration: none; border-bottom-color: var(--moon-2); }
.keyfact__more.is-conflict { color: var(--warm); border-bottom-color: color-mix(in srgb, var(--warm) 45%, transparent); }
.keyfact__more .icon { vertical-align: -1px; }
.hero__meta a { display: inline-flex; align-items: center; gap: 4px; }

/* brain home: how it works */
.howto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: -6px 0 22px; border: 1px solid var(--line); border-radius: var(--r-2); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.howto__step { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.howto__step + .howto__step { border-left: 1px solid var(--line); }
.howto__step strong { color: var(--text); font-weight: 600; }
.howto__n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--font-ui); color: var(--moon); background: var(--moon-bg); border: 1px solid color-mix(in srgb, var(--moon-2) 30%, transparent); }

/* brain home: competitors */
.comp-list { list-style: none; margin: 0 -8px; padding: 0; display: grid; gap: 1px; }
.comp { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 9px; color: var(--text); font-size: 13.5px; }
.comp:hover { background: var(--surface-2); text-decoration: none; }
.comp__mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font: 600 13px var(--font-ui); color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.comp__name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp__facts { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; text-align: right; }

@media (max-width: 900px) {
  .howto { grid-template-columns: minmax(0, 1fr); }
  .howto__step + .howto__step { border-left: 0; border-top: 1px solid var(--line); }
  .howto__step { padding: 11px 14px; }
}

/* infobox: best value first, the rest small */
.infobox__row dt a { color: var(--text-3); }
.infobox__row dt a:hover { color: var(--warm); text-decoration: none; }
.infobox__val.is-historical { color: var(--text-2); }
.infobox__others { font-size: 11.5px; line-height: 1.45; color: var(--text-3); }
.infobox__others-label { font-weight: 600; }
.infobox__others.is-conflict .infobox__others-label { color: var(--warm); }
.infobox__more { color: var(--text-3); }

/* wiki: reference list, folded after the first dozen */
.refs__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.refs__head .refs__title { margin: 0; }
.refs__more { margin-top: 14px; }
.refs__more > summary { list-style: none; width: max-content; }
.refs__more > summary::-webkit-details-marker { display: none; }
.refs__more[open] > summary { display: none; }
.refs__more > .refs__list { margin-top: 12px; }

/* entity data view: one row per value, the other sources folded */
.fact__more { grid-column: 1 / -1; margin-top: -2px; font-size: 12.5px; }
.fact__more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); }
.fact__more > summary::-webkit-details-marker { display: none; }
.fact__count { color: var(--text-2); font-weight: 500; }
.fact__more-open { color: var(--moon); margin-left: 4px; }
.fact__more[open] .fact__more-open { display: none; }
.fact__more > summary:hover .fact__more-open { text-decoration: underline; text-underline-offset: 3px; }
.fact__others { list-style: none; margin: 8px 0 2px; padding: 0 0 0 14px; border-left: 2px solid var(--line-2); display: grid; gap: 8px; }
.fact__others li { display: grid; gap: 2px; scroll-margin-top: 90px; }
.fact__others q { font-family: var(--font-read); font-size: 14px; line-height: 1.45; color: var(--text-2); quotes: "“" "”"; }
.fact__other-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; }
.fact__other-meta .cite { vertical-align: 0; }
.fact:target, .fact__others li:target { background: var(--moon-bg); }
.facts-more { border-top: 1px solid var(--line); }
.facts-more > summary { list-style: none; cursor: pointer; padding: 12px 20px; color: var(--moon); font-size: 13px; font-weight: 500; }
.facts-more > summary::-webkit-details-marker { display: none; }
.facts-more[open] > summary { display: none; }
.facts-more .facts .fact:first-child { border-top: 0; }
.pred-group--other .facts-more > summary { padding-left: 20px; }

/* conflicts: one row per value with its support */
.conflicts__intro { margin: -6px 0 16px; max-width: 640px; }
.conflict__values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.conflict__opt { display: grid; gap: 8px; align-content: start; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.conflict__opt:first-child { border-color: color-mix(in srgb, var(--warm) 35%, transparent); }
.conflict__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.conflict__opt .conflict__value { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.conflict__n { flex: none; font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.conflict__opt blockquote { margin: 0; font-family: var(--font-read); color: var(--text-2); font-size: 14px; line-height: 1.5; quotes: "“" "”"; }
.conflict__opt blockquote::before { content: open-quote; }
.conflict__opt blockquote::after { content: close-quote; }
.conflict__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-3); }
.conflict__meta .cite { vertical-align: 0; }
.link-list a.is-warn { color: var(--warm); }

/* neighbors: fold long lists */
.nb-more > summary { list-style: none; cursor: pointer; display: inline-block; font-size: 12px; color: var(--moon); padding: 3px 2px; }
.nb-more > summary::-webkit-details-marker { display: none; }
.nb-more[open] > summary { display: none; }

/* long lists: the first part, then a button */
.clamp-out { display: none !important; }
.is-filtering .clamp-out { display: revert !important; }
.is-filtering .clamp-out[hidden] { display: none !important; }
.is-filtering .clamp-more { display: none; }
.clamp-more { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--moon); font: 500 12.5px var(--font-ui); cursor: pointer; }
.clamp-more:hover { border-color: var(--line-3); background: var(--surface-3); }
.clamp-more::after { content: "↓"; font-size: 11px; }
.prose .clamp-more { margin-top: .6em; }
.idx-list + .clamp-more { margin-top: 10px; }

/* sources: pager */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.pager__nav { display: flex; align-items: center; gap: 10px; }

/* source view: the text scrolls in its own box, facts grouped by subject */
.snapshot__text { max-height: min(78vh, 1100px); overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.source-layout .wiki-side { max-height: calc(100vh - 96px); }
.src-side-note { margin: -4px 0 10px; }
.src-group + .src-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.src-group__subject { display: flex; align-items: center; gap: 0; color: var(--text); font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.src-group__subject .muted { margin-left: auto; font-weight: 400; font-size: 12px; }
.src-group__subject:hover { color: var(--moon); text-decoration: none; }
.src-fact { align-items: center; padding: 6px 8px; }
.src-fact__meta { flex-direction: row; }
.source-title { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .snapshot__text { max-height: 70vh; }
}
.keyfact__sub { flex-direction: column; align-items: flex-start; gap: 3px; }
.keyfact__sub .chip--status { margin-top: 1px; }

.snapshot__tools { display: flex; align-items: center; gap: 10px; flex: none; }
.quote-nav { display: inline-flex; align-items: center; gap: 4px; padding: 2px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); }
.quote-nav .icon-btn { width: 26px; height: 26px; border: 0; font-size: 13px; }
.quote-nav__pos { min-width: 64px; text-align: center; color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .snapshot__head { flex-wrap: wrap; padding: 14px 16px; }
}
.infobox__others { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 11px 12px; }
  .kpi__value { font-size: 20px; }
  .kpi__value small { font-size: 13px; }
  .kpi__label { font-size: 12px; }
  .kpi__sub { font-size: 10.5px; line-height: 1.35; }
  .feed__digest { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; cursor: pointer; font-size: 15px; }
  .feed__digest.is-open { display: block; -webkit-line-clamp: unset; }
  .comp__facts { max-width: 130px; }
}
.facts-none { padding: 12px 20px; }
.jump-select { display: none; }
@media (max-width: 900px) {
  .jump-select { display: flex; align-items: center; gap: 10px; position: sticky; top: 112px; z-index: 5; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .jump-select select { flex: 1; min-width: 0; }
}
@media (max-width: 900px) {
  .pred-group, .pred-sub, .conflicts { scroll-margin-top: 180px; }
}
/* sources: rows become small cards on phones */
@media (max-width: 640px) {
  .sources-table thead { display: none; }
  .sources-table, .sources-table tbody { display: block; }
  .sources-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .sources-table tr:last-child { border-bottom: 0; }
  .sources-table td { padding: 0; border: 0; }
  .sources-table tbody tr:hover td { background: transparent; }
  .sources-table td.src-cell { flex: 1 1 100%; max-width: 100%; }
  .sources-table .src-cell__title { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .sources-table td.num { margin-left: auto; }
  .sources-table td.num::after { content: " facts"; color: var(--text-3); font-size: 12px; }
}
.src-facts + .clamp-more { margin: 6px 0 2px; }

@media (max-width: 900px) {
  .search-grid > .stack-lg:last-child { order: -1; }      /* entities first on phones */
}

/* a signed sale under the Owner tile */
.keyfact__deal { display: block; line-height: 1.4; }
.keyfact__deal a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line, currentColor); }
.cite-pop__note { margin: 6px 0 0; font-size: 12px; color: var(--text-3); font-style: italic; }

/* ------------------------------------------------------------------ company brains (product, plans, decisions, team) */
.chip--state { height: 20px; font-size: 11px; text-transform: none; }
.infobox__row.is-inline dd { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.cmp-col__sub { font-size: 11px; color: var(--text-3); white-space: nowrap; }

.co-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 13.5px; }
.co-fact { display: inline-flex; align-items: baseline; gap: 8px; color: var(--text); min-width: 0; }
.co-fact__k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); white-space: nowrap; }
.co-fact--link { color: var(--moon); gap: 4px; align-items: center; }
.co-engines { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.co-engines .co-fact__k { margin-right: 4px; }
.co-note { margin: -6px 0 22px; }

.loop { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.loop__step { position: relative; display: flex; min-width: 0; }
.loop__card { display: grid; gap: 8px; align-content: start; width: 100%; color: var(--text); padding: 18px 18px 16px;
  border-top: 2px solid var(--t-Layer); transition: border-color .15s, transform .15s; }
.loop__card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--line-3); border-top-color: var(--t-Layer); }
.loop__n { font: 600 11px/1 var(--font-ui); color: var(--text-3); letter-spacing: .08em; }
.loop__name { font: 600 22px/1.15 var(--font-read); }
.loop__does { color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.loop__counts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.loop__arrow { position: absolute; right: -14px; top: 50%; transform: translate(50%, -50%); width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 999px; background: var(--bg); border: 1px solid var(--line-2);
  color: var(--text-3); z-index: 1; }
.loop__arrow .icon { width: 12px; height: 12px; }

.co-layer { margin-bottom: 18px; scroll-margin-top: 80px; }
.co-layer h2 a { color: var(--text); }
.co-layer__n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; font-size: 12px;
  background: color-mix(in srgb, var(--t-Layer) 18%, transparent); color: var(--t-Layer); }
.co-layer__does { color: var(--text-2); font-family: var(--font-read); font-size: 15px; margin: -4px 0 14px; max-width: 760px; }
.co-caps { table-layout: fixed; min-width: 720px; }
.co-caps__c1 { width: 27%; } .co-caps__c2 { width: 120px; } .co-caps__c3 { width: 130px; }
.co-caps td { vertical-align: middle; }
.co-caps__name { font-weight: 500; overflow-wrap: anywhere; }
.co-caps__name a { color: var(--text); }
.co-caps__does { color: var(--text-2); }
.co-caps__build { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-caps__build .chip--state { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.co-caps tr.is-spec .co-caps__name a { color: var(--text-2); }
.co-other summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.co-other__list { list-style: none; margin: 14px 0 0; padding: 0; columns: 2; column-gap: 28px; font-size: 13.5px; }
.co-other__list li { break-inside: avoid; padding: 4px 0; }
.co-other__list a { color: var(--text-2); }

.co-filter { margin-bottom: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.tl__label { font: 600 12px/1 var(--font-ui); text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin: 0 0 12px; }
.tl__items { list-style: none; margin: 0; padding: 0 0 0 22px; display: grid; gap: 12px; border-left: 1px solid var(--line-2); margin-left: 6px; }
.tl__item { position: relative; }
.tl__dot { position: absolute; left: -29px; top: 22px; width: 13px; height: 13px; border-radius: 999px; background: var(--bg);
  border: 2px solid var(--text-3); }
.tl__item--good .tl__dot { border-color: var(--good); background: var(--good-bg); }
.tl__item--moon .tl__dot { border-color: var(--moon-2); background: var(--moon-bg); }
.tl__item--warn .tl__dot { border-color: var(--warm); }
.tl__card { padding: 16px 20px; display: grid; gap: 6px; }
.tl__head { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.tl__num { font: 600 12px/1 var(--font-mono); color: var(--t-Decision); background: color-mix(in srgb, var(--t-Decision) 14%, transparent);
  padding: 4px 7px; border-radius: 6px; white-space: nowrap; }
.tl__title { font: 600 17px/1.3 var(--font-read); color: var(--text); overflow-wrap: anywhere; }
.tl__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--text-2); }
.tl__context { color: var(--text-2); font-size: 14px; line-height: 1.5; margin: 2px 0 0; }

.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.team__card { display: flex; gap: 16px; align-items: flex-start; }
.team__mark { flex: none; width: 52px; height: 52px; border-radius: 999px; display: grid; place-items: center;
  font: 600 18px var(--font-ui); color: var(--moon-ink); background: linear-gradient(135deg, var(--t-Person), color-mix(in srgb, var(--t-Person) 55%, var(--moon-2))); }
.team__body { min-width: 0; display: grid; gap: 6px; }
.team__name { font: 600 18px/1.25 var(--font-read); color: var(--text); }
.team__roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 14px; }
.team__at { margin: 0; }

.plans { margin-top: 34px; scroll-margin-top: 80px; }
.plans__table th.num, .plans__table td.num { text-align: right; }
.plans__provider th { background: var(--surface-2); text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--text); white-space: normal; }
.plans__provider th a { color: var(--text); margin-right: 6px; }
.plans__group.is-ours .plans__provider th { background: color-mix(in srgb, var(--moon-bg) 70%, var(--surface-2)); }
.plans__name { font-weight: 500; white-space: nowrap; }
.plans__name a { color: var(--text); }
.plans__table tr.is-old td { color: var(--text-3); }
.plans__older td { padding-top: 6px; padding-bottom: 10px; }
.plans__older summary { cursor: pointer; color: var(--text-3); }
.plans__old-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; color: var(--text-2); }

@media (max-width: 1100px) {
  .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loop__step:nth-child(2) .loop__arrow { display: none; }
}
@media (max-width: 640px) {
  .loop { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .loop__arrow { display: none; }
  .co-other__list { columns: 1; }
  .tl__items { padding-left: 18px; }
  .tl__dot { left: -25px; }
  .tl__card { padding: 14px 16px; }
  .tl__head { flex-wrap: wrap; gap: 6px; }
  .team { grid-template-columns: minmax(0, 1fr); }
}

/* brain home of a company brain */
.mini-loop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mini-loop__item { display: grid; gap: 5px; align-content: start; height: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); border-top: 2px solid var(--t-Layer); background: var(--surface-2); color: var(--text); }
.mini-loop__item:hover { text-decoration: none; border-color: var(--line-3); border-top-color: var(--t-Layer); }
.mini-loop__n { font-size: 11px; color: var(--text-3); }
.mini-loop__item strong { font: 600 17px/1.2 var(--font-read); }
.mini-loop__does { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.mini-loop__counts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.mini-loop__counts .chip { height: 19px; font-size: 10.5px; padding: 0 6px; }
.mini-plans { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.mini-plans__item { display: inline-flex; gap: 6px; align-items: baseline; color: var(--text); font-size: 13.5px; }
.mini-plans__item:hover { text-decoration: none; color: var(--moon); }
.mini-plans .more { margin-left: auto; }
.mini-team { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mini-team li { display: grid; grid-template-columns: 32px 1fr; column-gap: 10px; align-items: center; }
.mini-team__mark { grid-row: span 2; width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  font: 600 12px var(--font-ui); color: var(--moon-ink); background: linear-gradient(135deg, var(--t-Person), color-mix(in srgb, var(--t-Person) 55%, var(--moon-2))); }
.mini-team a { color: var(--text); font-weight: 500; }
.mini-dec { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.mini-dec li { display: grid; gap: 2px; }
.mini-dec a { color: var(--text); font-size: 13.5px; line-height: 1.4; }
.mini-dec .tl__num { font-size: 10.5px; padding: 2px 5px; margin-right: 2px; }
.mini-dec__st--good { color: var(--good); }
.mini-dec__st--moon { color: var(--moon); }
@media (max-width: 1240px) { .mini-loop { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mini-loop { grid-template-columns: minmax(0, 1fr); } .mini-plans .more { margin-left: 0; } }

/* brains list: our company first (a wide card), then the example brand brains */
.brains-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); font-weight: 600; margin: 8px 0 10px; }
.brains-label ~ .brains-label { margin-top: 28px; }
.bmark { --mark: var(--moon-2); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none;
  font: 600 22px var(--font-read); color: #fff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--mark) 78%, #fff), var(--mark));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.bmark:not([style]) { color: var(--moon-ink); background: linear-gradient(135deg, var(--moon), var(--moon-2)); }
.bmark--lg { width: 56px; height: 56px; border-radius: 15px; font-size: 28px; }
.bfeature { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 28px; color: var(--text);
  padding: 26px 28px; transition: border-color .15s, transform .15s;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, #003da5), var(--surface)); }
.bfeature:hover { text-decoration: none; border-color: var(--line-3); transform: translateY(-2px); }
.bfeature__main { display: grid; gap: 14px; align-content: start; min-width: 0; }
.bfeature__head { display: flex; gap: 16px; align-items: center; }
.bfeature__title { min-width: 0; display: grid; gap: 2px; }
.bfeature__title h2 { font: 600 26px/1.15 var(--font-read); }
.bfeature__go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.bfeature:hover .bfeature__go { color: var(--moon); }
.bfeature__summary { color: var(--text-2); font-family: var(--font-read); font-size: 17px; line-height: 1.5; max-width: 640px; }
.bfeature__types { display: flex; flex-wrap: wrap; gap: 6px; }
.bfeature__types .chip { background: var(--surface-2); border-color: var(--line); }
.bfeature__types .type-dot { margin: 0; }
.bfeature__side { display: grid; gap: 16px; align-content: start; padding-left: 26px; border-left: 1px solid var(--line); }
.bfeature__when { margin: 0; }
.bstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin: 0; }
.bstats div { display: grid; gap: 1px; }
.bstats dt { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.bstats dd { margin: 0; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.bstats span { font-size: 12px; color: var(--text-3); }
.bfresh { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 12px; color: var(--text-3); }
.bfresh__n { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; }
.bfresh .meter { margin: 0; }
.brains-howto { margin-top: 30px; }
.page-brains .brain-cards { grid-template-columns: repeat(auto-fill, minmax(320px, 460px)); }
@media (max-width: 900px) {
  .bfeature { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 22px; }
  .bfeature__side { padding-left: 0; border-left: 0; padding-top: 18px; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .bfeature__go { display: none; }
  .bfeature__title h2 { font-size: 22px; }
  .page-brains .brain-cards { grid-template-columns: minmax(0, 1fr); }
}
.plans .section-head { flex-wrap: wrap; }
.plans__table thead th:first-child, .plans__table td.plans__name { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.plans__table thead th:first-child { background: var(--surface-2); }
@media (max-width: 640px) {
  .plans__name { white-space: normal; min-width: 132px; max-width: 160px; }
  .plans .section-head span { flex-basis: 100%; }
}
