:root {
  --bg: #ffffff;
  --fg: #16181d;
  --muted: #626b7a;
  --line: #e3e6eb;
  --accent: #1f5fd8;
  --chip: #f2f4f7;
  --max: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161b;
    --fg: #eef1f5;
    --muted: #98a1b0;
    --line: #272b34;
    --accent: #8ab0ff;
    --chip: #1e222a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 64px;
}

a { color: var(--accent); }

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 16px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  color: var(--fg);
}

.tagline { margin: 0; color: var(--muted); font-size: 14px; }

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* Sits above the source credit in the footer. Given a little more weight than the rest of the
   footer: it is the one line there that changes how the data should be read. */
.site-footer .disclaimer {
  color: var(--fg);
  margin: 0 0 10px;
  max-width: 72ch;
}

.prose { max-width: 68ch; }
.prose p, .prose li { color: var(--muted); }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--fg); }

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 36px 0 12px; }
h3 { font-size: 15px; margin: 24px 0 8px; }

.hero { padding-top: 12px; }
.lede { color: var(--muted); font-size: 17px; max-width: 56ch; }

.search { margin: 24px 0 8px; position: relative; }

.search-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
}

.search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.search-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.search-results li + li { border-top: 1px solid var(--line); }

.search-results a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--fg);
}

.search-results a:hover { background: var(--chip); }
.search-results img { object-fit: contain; }
.result-name { font-weight: 550; }
.result-owner { color: var(--muted); font-size: 13px; margin-left: auto; }

.entity-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 8px; }
.entity-logo { width: 56px; height: 56px; object-fit: contain; flex: none; }
.summary { color: var(--muted); margin: 0 0 8px; }

.meta { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  background: var(--chip);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--muted);
}

a.chip { text-decoration: none; }
a.chip:hover { color: var(--fg); }

/* A category worked out from the company's owner rather than stated by the company. Dashed, so
   it does not read as flatly as a fact the company asserted about itself. */
.chip-inferred { border: 1px dashed var(--line); }

.ownership { border-top: 1px solid var(--line); margin-top: 24px; }

.answer { font-size: 19px; line-height: 1.45; }

.chain {
  list-style: none;
  padding: 0;
  margin: 8px 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.chain li::after { content: " →"; }
.chain li:last-child::after { content: ""; }
.chain li:last-child { color: var(--fg); font-weight: 550; }

.owner-list, .subsidiaries, .domains, .citations {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.owner-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.pct { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

.subsidiaries { columns: 2; column-gap: 24px; }

/* Flex so the percentage sits at the right of its own column rather than trailing the name. */
.subsidiaries li {
  break-inside: avoid;
  padding: 3px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.holdings + .holdings { margin-top: 20px; }

/* Quieter than an h3 elsewhere: this labels a list rather than opening a new subject, and a
   company whose holdings are all of one kind should not look like it has three sections. */
.holdings-heading {
  font-size: 13px;
  font-weight: 550;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}

.holdings .note { margin: 4px 0 0; }

/* Brands. Columned like `.subsidiaries` rather than pilled like `.related`, because these are a
   list to read down and not somewhere to click through to — a company with sixty of them should
   read as an inventory. Most carry no link at all, so the pill treatment would promise a
   destination that does not exist. */
.brands {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  columns: 2;
  column-gap: 24px;
}

.brands li {
  break-inside: avoid;
  padding: 3px 0;
}

/* What the brand sells, after the name. Quiet, because it is a qualifier rather than a second
   fact — "Post-it — stationery" reads as one line, not two. */
.brand-tags {
  color: var(--muted);
  font-size: 13px;
}

.brand-tags::before { content: " — "; }

/* Related brands and similar companies. A wrapping row of links rather than a column: these are
   somewhere to go next, not a table to read down, and the logo is what a reader recognises. */
.related {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
}

.related a:hover { border-color: var(--accent); }
.related img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; }

.domains li, .citations li { padding: 3px 0; }

.accounted, .note {
  color: var(--muted);
  font-size: 14px;
}

.accounted {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.parent-owners { margin-top: 24px; }

.featured { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }

.featured a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--fg);
}

.featured a:hover { background: var(--chip); }
.featured img { width: 18px; height: 18px; object-fit: contain; }

.explainer p { color: var(--muted); max-width: 62ch; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .subsidiaries, .brands { columns: 1; }
  .related a { font-size: 13px; }
  h1 { font-size: 25px; }
}
