/* Red Hat Mono, self-hosted (SIL Open Font License 1.1: fonts/OFL.txt). The build puts this
   in front of shared.css in both stylesheets. */
@font-face {
  font-family: "Red Hat Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/red-hat-mono-latin-ext-400.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Red Hat Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/red-hat-mono-latin-400.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Red Hat Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/red-hat-mono-latin-ext-500.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Red Hat Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/red-hat-mono-latin-500.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Red Hat Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/red-hat-mono-latin-ext-700.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Red Hat Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/red-hat-mono-latin-700.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Shared by the search page and the record pages: theme tokens, base elements, the header,
   the key/value list and the full record view. Copied from design/prototype/shared.css, which
   stays as the reference; this is the one the site is built from. */
:root {
  --bg: #fbfbfc; /* paper */
  --fg: #17191e; /* ink */
  --dim: #666b74; /* secondary text, keys in the preview */
  --faint: #a2a7af; /* rules of thumb: separators, placeholders */
  --rule: #e2e4e8;
  --accent: #1f55a8; /* prompt, matched characters, links */
  --ok: #2d7a4c;
  --warn: #9a6400;
  --bad: #b3261e;
  --sel-bg: var(--fg); /* selection is reverse video */
  --sel-fg: var(--bg);
  --mono: "Red Hat Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fs: 14px;
  --fs-prompt: 22px;
  --fs-small: 12px;
  --lh: 1.55;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131417;
    --fg: #e4e4e1;
    --dim: #92969e;
    --faint: #5b5f67;
    --rule: #2a2d33;
    --accent: #8db3ef;
    --ok: #7fc39a;
    --warn: #dfb15a;
    --bad: #ef8a80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131417;
  --fg: #e4e4e1;
  --dim: #92969e;
  --faint: #5b5f67;
  --rule: #2a2d33;
  --accent: #8db3ef;
  --ok: #7fc39a;
  --warn: #dfb15a;
  --bad: #ef8a80;
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--fs) / var(--lh) var(--mono);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.btn {
  color: var(--accent);
  white-space: nowrap;
}
.btn::before {
  content: "[";
  color: var(--faint);
}
.btn::after {
  content: "]";
  color: var(--faint);
}
.btn:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
kbd {
  font: inherit;
}
[hidden] {
  display: none;
}

/* Text for screen readers only (live regions). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* header */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2ch;
  padding-block: 14px 4px;
}
.mark {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}
.top nav {
  display: flex;
  gap: 2ch;
}

/* status colours */
.st-active {
  color: var(--ok);
}
.st-lapsed {
  color: var(--warn);
}
.st-retired {
  color: var(--bad);
}

/* key/value list */
.kv {
  display: grid;
  grid-template-columns: 12ch minmax(0, 1fr);
  column-gap: 1.5ch;
  row-gap: 2px;
  margin: 0;
}
.kv dt {
  color: var(--dim);
}
.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.kv .none {
  color: var(--faint);
}

/* full record view */
.record {
  overflow-y: auto;
  padding-block: 18px 24px;
}
.record .inner {
  max-width: 92ch;
  display: grid;
  gap: 18px;
}
.record h1 {
  font: inherit;
  font-size: var(--fs-prompt);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
.record .name {
  font-weight: 500;
}
.record .kv {
  grid-template-columns: 14ch minmax(0, 1fr);
}
.record .src {
  color: var(--dim);
}

@media (max-width: 640px) {
  :root {
    --fs: 15px;
    --fs-prompt: 19px;
  }
  .kv,
  .record .kv {
    grid-template-columns: 10ch minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    /* biome-ignore lint/complexity/noImportantStyles: reduced motion must win over any rule */
    scroll-behavior: auto !important;
  }
}

/* Record pages only. Theme tokens and the record view come from design/prototype/shared.css,
   which the build puts in front of this file. */
.page {
  padding-inline: 16px;
  max-width: 1320px;
  margin-inline: auto;
}
.page > .record {
  border-top: 1px solid var(--rule);
}
.record .lei {
  user-select: all;
}
/* The heading holds the LEI and the legal name: the LEI large, the name on its own line below
   in the size and weight of the text around it. */
.record h1.title {
  font-size: var(--fs);
  font-weight: 500;
  letter-spacing: normal;
}
.record .title .lei {
  display: block;
  font-size: var(--fs-prompt);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.record .title .name {
  display: block;
}
.record .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1ch 2ch;
}
.record .kv dd > div + div {
  margin-top: 2px;
}
.copied {
  color: var(--ok);
}
.record time {
  font: inherit;
}
.record .src {
  overflow-wrap: anywhere;
}

/* The about page: the man page of the search page (search.css), set in the same column. */
.page > .about {
  border-top: 1px solid var(--rule);
}
.doc {
  padding-block: 16px 24px;
  max-width: 76ch;
}
.doc h2 {
  font: inherit;
  font-weight: 700;
  margin: 18px 0 2px;
}
.doc p,
.doc dl {
  margin: 0 0 8px 7ch;
}
.man-head {
  display: flex;
  justify-content: space-between;
  gap: 2ch;
  color: var(--dim);
}
.man-head span:nth-child(2) {
  text-align: center;
}
.man-head.foot {
  margin-top: 18px;
}
.doc .keys {
  display: grid;
  grid-template-columns: 14ch minmax(0, 1fr);
  margin-left: 7ch;
  row-gap: 2px;
}
.doc .keys dd {
  margin: 0;
}
/* Narrow screens: the label sits above its value, so long labels never clip. */
@media (max-width: 640px) {
  .record .kv {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }
  .record .kv dd {
    margin-bottom: 8px;
  }
  .doc p,
  .doc dl,
  .doc .keys {
    margin-left: 2ch;
  }
  .man-head span:nth-child(2) {
    display: none;
  }
}
