/*
 * Librarium Militaris: the pages that are read rather than browsed.
 *
 * What the archive is, the questions it is asked, what it collects, the events
 * it holds footage from, and the way off the morning email. Narrow measure,
 * because these are the only pages here that are a column of text rather than a
 * grid of cards.
 */

@layer components {
  .prose {
    max-width: 48rem;
    margin: 0 auto;
    padding: var(--space-48) var(--gutter) var(--space-64);
    color: var(--color-ink-muted);
    line-height: var(--leading-airy);

    & h2 {
      font-family: var(--font-heading);
      font-weight: 600;
      font-size: var(--text-18);
      color: var(--color-accent);
      text-transform: uppercase;
      letter-spacing: var(--tracking-2xl);
      margin-top: var(--space-40);
      margin-bottom: var(--space-12);
    }

    & p + p { margin-top: var(--space-16); }

    & a {
      color: var(--color-accent);
      text-decoration: underline;
      text-underline-offset: 0.2em;
    }

    & a:hover { color: var(--color-accent-hover); }
  }

  .prose__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-32);
    line-height: var(--leading-tight);
    color: var(--color-ink-bright);
    text-transform: uppercase;
    letter-spacing: var(--tracking-lg);
    margin-bottom: var(--space-20);

    @media (min-width: 768px) { font-size: var(--text-44); }
  }

  /* The paragraph that says what the page is for, marked off by a rule in the
     accent rather than by being any louder than the text under it. */
  .prose__lede {
    color: var(--color-ink-strong);
    font-size: var(--text-17);
    border-left: 2px solid var(--color-accent-edge);
    padding-left: var(--space-16);
    margin-bottom: var(--space-32);
  }

  .prose__aside {
    margin-top: var(--space-48);
    padding-top: var(--space-24);
    border-top: 1px solid var(--color-border);
    color: var(--color-ink-soft);
    font-size: var(--text-15);
  }

  /* Where a column of text has something to be done at the end of it. button_to
     wraps its button in a form, which is a block and would drop the button that
     follows it onto its own line, so the row is a flex container and the form is
     flattened into it. Wraps rather than shrinks: two uppercase labels side by
     side do not fit a narrow phone, and a leave-the-roll button is the last place
     to start ellipsising words. */
  .prose__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-12);
    margin-top: var(--space-32);

    & form { display: contents; }
  }

  .prose__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-16) var(--space-24);
    margin: var(--space-32) 0;
    padding: var(--space-20);
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);

    @media (min-width: 640px) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  }

  .prose__stat {
    & dt {
      font-family: var(--font-heading);
      font-size: var(--text-11);
      letter-spacing: var(--tracking-3xl);
      text-transform: uppercase;
      color: var(--color-ink-dim);
    }

    & dd {
      font-family: var(--font-mono);
      font-size: var(--text-20);
      color: var(--color-accent);
      margin-top: var(--space-2);
    }
  }

  /* One question, one answer, each self-contained: they are written to be lifted
     out and quoted somewhere with none of this page around them. */
  .faq__entry + .faq__entry {
    margin-top: var(--space-32);
    padding-top: var(--space-32);
    border-top: 1px solid var(--color-border);
  }

  /* A question is an h2, so it has to say where it differs from the section
     headings above: it is a sentence rather than a label, and it opens its own
     entry rather than a run of them. Written as a descendant so it wins against
     .prose h2 without either of them being restated. */
  .prose .faq__question {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-18);
    color: var(--color-ink-bright);
    text-transform: none;
    letter-spacing: var(--tracking-3xs);
    margin-top: 0;
    margin-bottom: var(--space-12);
  }
}
