/* ============================================================
   grammar.css — NewConnections
   The five recurring grammar elements.
   ============================================================ */

/* ----- 1. The site header --------------------------------- */
/*
   Holds the mark on the left and the ascent affordance on
   the right. Sits at the top of every page, consistent in
   position across all layers.
*/

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 1.5rem var(--page-padding-x) 0;
}

/* ----- 2. The mark ---------------------------------------- */

.mark {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.mark-wordmark {
  /* Home page only. Drawn capitals for N and C, small caps elsewhere.
     Synthesized small-caps via font-variant; letter-spacing widens
     the rhythm so the mark reads as a deliberate composition. */
  font-size: 1.4rem;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.mark-letters {
  /* The clickable NC on every page except home. Same identity as
     the wordmark, scaled and calibrated for a quieter register. */
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: opacity 0.2s ease;
}

.mark-letters:hover {
  opacity: 0.65;
}

/* The drawn logo on inner pages (since 13 November 2026).
   160px is the logo's minimum width in the design system. */
.mark-logo {
  display: block;
  line-height: 0;
}

.mark-logo img {
  display: block;
  width: 160px;
  height: auto;
}

/* ----- 3. The ascent affordance --------------------------- */

.ascent {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease;
}

.ascent:hover {
  opacity: 0.75;
}

/* ----- 4. Responsive header ------------------------------- */

@media (max-width: 48rem) {
  .site-header {
    padding: 1rem 1.5rem 0;
  }
}

/* ----- 5. Writing-layer index ------------------------------ */

.writing-index {
  list-style: none;
  padding: 0;
  margin: 2.5em 0 0;
}

.writing-index li {
  margin-bottom: 1.2em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
}

.writing-index a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.writing-index a:hover {
  border-bottom-color: var(--color-accent);
}

.writing-date {
  font-size: 0.8em;
  color: var(--color-text-soft);
  font-variant-numeric: tabular-nums;
}