/*
 * The component pages link this file as mandoc.css. The colours follow
 * the interface palette in src/gui/shell/theme.zig, as main.css does.
 */

@font-face {
  font-family: "Martian Mono";
  src: url("MartianMonoVF.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  /* Block, not swap: text stays invisible until the face is ready
     instead of flashing the fallback stack on a fresh load. */
  font-display: block;
}

:root {
  color-scheme: dark;
  --bg: #141414; /* wave_bg */
  --rule: #3a3a3a; /* splitter_inactive */
  --border: #777777; /* border_gray */
  --muted: #8a8a8a; /* fill_blue */
  --text: #ffffff; /* text_white */
  --cursor: #264d69; /* row_cursor */
  --font: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

html {
  background: var(--bg);
}

body {
  max-width: 50rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  font-family: var(--font);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

.lga-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  /* Fainter behind the content column, fuller at the edges. */
  -webkit-mask-image: radial-gradient(ellipse at center, rgb(0 0 0 / 0.3) 25%, #000 75%);
  mask-image: radial-gradient(ellipse at center, rgb(0 0 0 / 0.3) 25%, #000 75%);
  pointer-events: none;
  image-rendering: pixelated;
}

::selection {
  color: var(--text);
  background: var(--cursor);
}

a {
  color: var(--text);
  text-decoration-color: var(--border);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 2px;
}

/* The strip templates/component.temple adds at the top of each page. */
.manual-nav {
  padding-bottom: 0.75rem;
  font-size: 9pt;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
}

.manual-nav a[aria-current="page"] {
  color: var(--muted);
  text-decoration: none;
}

table.head,
table.foot {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;
  color: var(--muted);
}

table.head {
  margin: 0.5rem 0;
}

table.foot {
  margin-top: 2rem;
  border-top: 1px solid var(--rule);
}

table.head td,
table.foot td {
  padding: 0.5rem 0 0;
}

.head-vol {
  text-align: center;
}

.head-rtitle,
.foot-os {
  text-align: right;
}

/* Section text sits in from its heading, as a terminal shows it. */
h1.Sh {
  margin: 1.75rem 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

section.Sh > :not(h1) {
  margin-left: 2rem;
}

a.permalink {
  color: inherit;
  text-decoration: none;
}

a.permalink:hover {
  text-decoration: underline;
  text-decoration-color: var(--border);
}

p.Pp {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.Bd-indent {
  padding-left: 2rem;
}

ul.Bl-bullet {
  padding-left: 1.25rem;
}

/* The OVERVIEW pairs, as terminals print tag lists. */
dl.Bl-tag {
  margin: 0.25rem 0;
}

dl.Bl-tag dt.It-tag {
  margin-top: 0.4rem;
  font-weight: 700;
}

dl.Bl-tag dd.It-tag {
  margin-left: 2rem;
}

@media (max-width: 575px) {
  section.Sh > :not(h1) {
    margin-left: 0;
  }

  .Bd-indent {
    padding-left: 1rem;
  }
}
