/* Document pages: privacy, terms, confidentiality, origin, contact, glossary
   and the private project record.

   These pages are read, not scanned. The whole sheet gives running text a real
   measure so a line never runs the width of a desktop viewport, sets the two
   list shapes the documents need, and lays a glossary entry out the way a
   drawing note is laid out: the term in its own column, the reading matter in
   a measured column beside it.

   Everything here is prefixed .doc- and uses only the system tokens. There are
   no borders drawn for decoration, no shadows, no hover motion. */

/* --------------------------------------------------------------------------
   Running text
   -------------------------------------------------------------------------- */

.doc-body {
  max-width: var(--measure-width);
}

.doc-body > * + * {
  margin-top: 1.1em;
}

.doc-body p {
  color: var(--metal);
}

.doc-body strong {
  color: var(--metal);
  font-weight: 600;
}

.doc-list {
  max-width: var(--measure-width);
  margin: 1.1em 0 0;
  padding: 0;
  list-style: none;
  color: var(--metal);
}

.doc-list > li {
  position: relative;
  padding-left: 1.6em;
}

.doc-list > li + li {
  margin-top: 0.85em;
}

/* A drawn tick rather than a bullet glyph: it belongs to the same house set as
   the marks, and it sits on the first line's optical centre. */
.doc-list > li::before {
  content: "";
  position: absolute;
  left: 0.15em;
  top: 0.62em;
  width: 0.7em;
  height: 2px;
  border-radius: 1px;
  background: var(--copper-quiet);
}

.doc-list strong {
  color: var(--metal);
  font-weight: 600;
}

.doc-mono {
  font-family: var(--mono);
  font-size: 0.94em;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  color: var(--metal);
}

/* --------------------------------------------------------------------------
   Glossary index
   -------------------------------------------------------------------------- */

.doc-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-top: 2rem;
  max-width: 62rem;
}

.doc-index a {
  color: var(--metal-2);
  text-decoration: none;
  padding: 0.15rem 0;
  transition: color 120ms linear;
}

.doc-index a:hover,
.doc-index a:focus-visible {
  color: var(--metal);
}

/* --------------------------------------------------------------------------
   Glossary entries
   -------------------------------------------------------------------------- */

.doc-terms {
  margin-top: 2.4rem;
}

.doc-term {
  display: grid;
  gap: 0.5rem;
  padding: 2rem 0;
  scroll-margin-top: 6rem;
}

.doc-term + .doc-term {
  background-image: linear-gradient(to right, var(--edge), transparent 42%);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top left;
}

.doc-term-name {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--metal);
}

.doc-term-aka,
.doc-term-definition,
.doc-term-misuse {
  margin: 0;
  max-width: var(--measure-width);
  color: var(--metal);
}

.doc-term-aka {
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--metal-2);
}

.doc-term-definition {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--metal);
}

.doc-term-misuse {
  font-size: 0.98rem;
  line-height: 1.65;
}

.doc-term-tag {
  color: var(--copper);
  font-family: var(--mono);
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

.doc-term-links {
  margin: 0.3rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.4rem;
  font-size: 0.92rem;
}

.doc-term-links a {
  color: var(--metal-2);
  text-decoration: none;
  transition: color 120ms linear;
}

.doc-term-links a:hover,
.doc-term-links a:focus-visible {
  color: var(--copper);
}

@media (min-width: 60rem) {
  .doc-term {
    grid-template-columns: 15rem minmax(0, 1fr);
    column-gap: 2.5rem;
    row-gap: 0.55rem;
  }

  .doc-term-name {
    grid-row: 1 / span 4;
    grid-column: 1;
    padding-top: 0.15rem;
  }

  .doc-term-aka,
  .doc-term-definition,
  .doc-term-misuse,
  .doc-term-links {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .doc-index a,
  .doc-term-links a {
    transition: none;
  }
}
