:root {
  --ink: #16181d; --soft: #5b616e; --body: #3d424d;
  --line: #e3e6ea; --paper: #fff; --hover: #f6f7f9;
  --accent: #2f5fbf; --accent-dark: #234a96;
  --chip: #eef2fb; --chip-ink: #1f3f80; --mark: #fff0b3;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.5 Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* header: name, tabs, help, over one black hairline */
header .wrap { padding-top: 16px; }
.bar {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px 32px;
  padding-bottom: 12px; border-bottom: 1px solid var(--ink);
}
.bar h1 { margin: 0; font-size: 18px; font-weight: 700;
          letter-spacing: -0.01em; }
.bar h1 a { color: inherit; }
nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
nav a, nav button { color: var(--soft); line-height: 1.5; }
nav a[aria-current] {
  color: var(--ink); font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 6px;
}
nav button {
  height: auto; padding: 0; border: 0; background: none;
  color: var(--soft); font: inherit; font-size: 14px; font-weight: 400; cursor: pointer;
}
nav button:hover { background: none; color: var(--ink); }
nav a:hover, nav button:hover { color: var(--ink); }

main.wrap { padding-top: 40px; padding-bottom: 72px; }
/* the summary and the search box hang from one top line */
.top {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 32px 48px; margin-bottom: 56px;
}
.intro { flex: 1 1 280px; display: flex; flex-direction: column;
         gap: 8px; }
.intro h2 { margin: 0; font-size: 30px; font-weight: 600;
            letter-spacing: -0.02em; line-height: 1.1; }
.intro p { margin: 0; font-size: 14px; color: var(--soft); }
.intro a { font-size: 14px; }
.label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--soft);
}

/* inputs are a single hairline, buttons small and squarish */
.side { flex: 2 1 480px; display: flex; flex-direction: column;
        gap: 10px; padding-top: 6px; }
.line { display: flex; flex-wrap: wrap; align-items: flex-end;
        gap: 16px; }
input[type=search] {
  flex: 1 1 240px; min-width: 0; height: 40px; padding: 0;
  font: inherit; font-size: 16px; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  background: none; outline: none;
}
input[type=search]:focus { border-bottom-color: var(--accent); }
button {
  height: 40px; padding: 0 16px; font: inherit; font-size: 14px;
  font-weight: 600; color: #fff; background: var(--ink);
  border: 1px solid var(--ink); border-radius: 0; cursor: pointer;
}
button:hover { background: var(--paper); color: var(--ink); }
button:disabled { opacity: 0.6; cursor: default; }
button.plain {
  height: 36px; padding: 0 14px; font-size: 13px; color: var(--ink);
  background: none; border: 1px solid var(--ink);
}
button.plain:hover { background: var(--ink); color: #fff; }

/* companies */
/* rows keep 12px inside the hairlines, room for the hover band */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th {
  text-align: left; padding: 0 12px 10px;
  border-bottom: 1px solid var(--ink);
}
/* one size and colour for every cell, so the name, the count and
   the date sit on one line; only the subdomains are smaller */
td { padding: 18px 12px; border-bottom: 1px solid var(--line);
     vertical-align: top; font-size: 15px; line-height: 1.5;
     color: var(--ink); font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--hover); }
.num { text-align: right; width: 90px; }
.date { width: 120px; white-space: nowrap; }
/* column names keep the label size, whatever column they head */
th.label { font-size: 11px; }
.host { font-weight: 600; color: var(--ink); }
a.host:hover { color: var(--accent); }
tr[data-href] { cursor: pointer; }
/* a company's PDFs: a small first page beside each name */
.named { display: flex; gap: 14px; align-items: flex-start; }
.named > div { min-width: 0; overflow-wrap: anywhere; }
.mini {
  flex: 0 0 40px; height: 52px; overflow: hidden; line-height: 0;
  border: 1px solid var(--line); background: var(--hover);
}
.mini img { width: 100%; height: auto; }
/* "Show more", a link drawn as the square outlined button */
.more {
  display: flex; align-items: center; gap: 16px; margin-top: 32px;
  font-size: 13px; color: var(--soft);
}
.more a {
  display: inline-flex; align-items: center; height: 36px;
  padding: 0 14px; font-size: 13px; font-weight: 600;
  color: var(--ink); border: 1px solid var(--ink);
}
.more a:hover { background: var(--ink); color: #fff; }
/* a row reached by "Show more" stays clear of the top edge */
[id^="row-"] { scroll-margin-top: 24px; }
.intro p + p { margin-top: -4px; }
.subs { margin-top: 4px; font-size: 13px; color: var(--soft); }
.live { margin-left: 8px; font-size: 12px; font-weight: 600;
        color: var(--accent); }

/* results */
.heads, .result {
  display: flex; flex-wrap: wrap; gap: 8px 48px;
}
.heads { padding: 0 12px 10px; border-bottom: 1px solid var(--ink); }
.heads p { margin: 0; font-size: 11px; }
.result { padding: 24px 12px; border-bottom: 1px solid var(--line); }
.result:hover { background: var(--hover); }
.where {
  flex: 1 1 200px; max-width: 280px; display: flex;
  flex-direction: column; gap: 4px; font-size: 13px;
  color: var(--soft); font-variant-numeric: tabular-nums;
}
.thumb {
  width: 72px; margin-bottom: 8px; line-height: 0;
  border: 1px solid var(--line);
}
.thumb img { width: 100%; height: auto; }
.doc { flex: 3 1 480px; min-width: 0; display: flex;
       flex-direction: column; gap: 10px; }
.doc h3 { margin: 0; font-size: 17px; font-weight: 600;
          line-height: 1.35; overflow-wrap: anywhere; }
.doc h3 a { color: var(--ink); }
.doc h3 a:hover { color: var(--accent); }
.passage {
  margin: 0; font-size: 14px; line-height: 1.65; color: var(--body);
  overflow-wrap: anywhere; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
mark { background: var(--mark); color: inherit; padding: 0 2px; }
.source {
  margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px;
  font-size: 13px; color: var(--soft);
}
.source strong { color: var(--ink); font-weight: 600; }
.source a {
  min-width: 0; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.heads + .empty { margin: 24px 0 0; color: var(--soft); }

/* add a company */
.form { flex: 2 1 480px; display: flex; flex-direction: column;
        gap: 40px; padding-top: 6px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field p { margin: 0; font-size: 13px; color: var(--soft); }
.chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  min-height: 44px; padding: 4px 0; cursor: text;
  border-bottom: 1px solid var(--ink);
}
.chips:focus-within { border-bottom-color: var(--accent); }
.chips input {
  flex: 1 1 200px; min-width: 0; height: 32px; padding: 0;
  font: inherit; font-size: 15px; color: var(--ink);
  border: 0; outline: 0; background: none;
}
.chip {
  display: inline-flex; align-items: center; gap: 2px;
  height: 30px; padding: 0 2px 0 10px; font-size: 14px;
  font-weight: 500; background: var(--chip); color: var(--chip-ink);
  border-radius: 0;
}
.chip button {
  width: 26px; height: 26px; padding: 0; font-size: 16px;
  font-weight: 400; line-height: 1; color: var(--chip-ink);
  background: none; border: 0;
}
.chip button:hover { background: none; color: var(--ink); }
.checks {
  list-style: none; margin: 0; padding: 0; font-size: 14px;
  color: var(--body); border-top: 1px solid var(--ink);
}
.checks li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.checks .ok::before { content: "✓  "; color: #1a7f4b; }
.checks .no::before { content: "✗  "; color: #b3261e; }
.actions { display: flex; flex-wrap: wrap; align-items: center;
           gap: 20px; }
.actions a { font-size: 14px; color: var(--soft); }
.outcome { margin: 0; font-size: 14px; color: var(--body); }
.outcome:empty { display: none; }

dialog {
  max-width: 520px; padding: 24px 28px; color: var(--ink);
  border: 1px solid var(--ink); border-radius: 0;
}
dialog::backdrop { background: rgba(22, 24, 29, 0.4); }
dialog h2 { font-size: 17px; margin: 0 0 8px; }
dialog p { margin: 8px 0; font-size: 15px; }
dialog form { display: flex; justify-content: flex-end;
              margin-top: 16px; }

/* the header's Sign out is a form, drawn as the links beside it */
nav form { margin: 0; }

/* the home page: a large claim beside the sign-in form, and the
   three steps under them */
.hero .intro { flex: 3 1 420px; gap: 20px; }
.hero .intro h2 { font-size: 52px; line-height: 1.05; }
.hero .intro p { font-size: 17px; color: var(--body); }
input[type=email] {
  flex: 1 1 240px; min-width: 0; height: 40px; padding: 0;
  font: inherit; font-size: 16px; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  background: none; outline: none;
}
input[type=email]:focus { border-bottom-color: var(--accent); }
.field p.error { color: #b3261e; }
.steps { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.steps > div {
  flex: 1 1 220px; padding-top: 12px;
  border-top: 1px solid var(--ink);
}
.steps p { margin: 0 0 8px; font-size: 14px; color: var(--body); }
.steps p.label { font-size: 11px; color: var(--soft); }
