/**
 * Typography System
 * Roboto typographic scale
 * Namespace: nim-
 *
 * Sizes, line heights and letter spacing all come from tokens in
 * variables.css — never a literal here. Each class binds a size to the
 * leading and tracking that belong with it, because for Roboto the three are
 * not independent: small text needs looser leading and positive tracking,
 * display text needs the opposite.
 *
 * The element selectors in base.css carry the same scale, so `<h2>` and
 * `.nim-h2` render identically. Reach for the class only to give a
 * non-heading element a heading's appearance.
 */

/* ==========================================
   HEADINGS
   Shifted up one token: each class keeps the pixel size it had before the
   scale was consolidated, except where noted.
     h1  48px (was --text-3xl, same px)
     h2  36px (was --text-2xl, same px)
     h3  30px (was --text-xl 28px, +2px)
     h4  24px (was --text-lg 20px, +4px)
     h5  20px (was --text-base 17px, +3px)
     h6  17px (was --text-sm 14px, +3px)
   ========================================== */

.nim-h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tighter);
  color: var(--text-primary);
}

.nim-h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tighter);
  color: var(--text-primary);
}

.nim-h3 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

.nim-h4 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-snug);
  color: var(--text-primary);
}

.nim-h5 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  line-height: var(--leading-relaxed);
  letter-spacing: var(--tracking-normal);
  color: var(--text-primary);
}

.nim-h6 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: var(--leading-relaxed);
  letter-spacing: var(--tracking-normal);
  color: var(--text-primary);
}

/* ==========================================
   BODY TEXT
   ========================================== */



.nim-body {
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-normal);
  color: var(--text-primary);
}

.nim-body-small {
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  /* Caption leading, not body: 15px over a long measure needs the extra room
     more than 17px does, and --leading-body would be too loose at this size. */
  line-height: var(--leading-caption);
  letter-spacing: var(--tracking-wide);
  color: var(--text-secondary);
}

/* 12px sits at the floor of the scale, where Roboto has the least character
   differentiation. Medium weight rather than normal, and --text-tertiary is
   deliberately not used: light grey at 12px is where this font actually fails.
   Weight 500 only became real when the font request gained a 300..700 range. */
.nim-supporting-text {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  line-height: var(--leading-caption);
  letter-spacing: var(--tracking-wider);
  color: var(--text-secondary);
}

.nim-label {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  line-height: var(--leading-caption);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--grey-550);
}

/* ==========================================
   TEXT UTILITIES
   ========================================== */

.nim-text-primary { color: var(--text-primary) ; }
.nim-text-secondary { color: var(--text-secondary); }
.nim-text-tertiary { color: var(--text-tertiary); }
.nim-text-muted { color: var(--text-muted); }
.nim-text-placeholder { color: var(--text-placeholder); }
.nim-text-disabled { color: var(--text-disabled); }

.nim-text-brand-blue { color: var(--blue-550); }
.nim-text-brand-orange { color: var(--orange-550); }

/* --text-* not --color-*: these are type, and the fill-step values these used
   to point at failed WCAG AA on white (2.28 / 2.15 / 3.76 against 4.5). */
.nim-text-success { color: var(--text-success); }
.nim-text-warning { color: var(--text-warning); }
.nim-text-danger { color: var(--text-danger); }

.nim-font-light { font-weight: var(--font-light); }
.nim-font-normal { font-weight: var(--font-normal) !important; }
.nim-font-medium { font-weight: var(--font-medium) !important; }
.nim-font-semibold { font-weight: var(--font-semibold); }
.nim-font-bold { font-weight: var(--font-bold) !important; }

.nim-text-center { text-align: center; }
.nim-text-left { text-align: left; }
.nim-text-right { text-align: right; }

.nim-uppercase { text-transform: uppercase; }
.nim-lowercase { text-transform: lowercase; }
.nim-capitalize { text-transform: capitalize; }


.nim-url {
    text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 4px;


}

.nim-url:hover {
  color: var(--blue-550) !important;
    font-weight: var(--font-normal);
        text-decoration: underline;
}


/* ==========================================
   FONT SIZE UTILITIES

   Each utility also sets the tracking paired with its size. For Roboto the two
   are coupled — a 12px run needs positive tracking and a 36px run needs
   negative — so a size utility that changed size alone would leave text at the
   wrong fit and the caller would have to remember a second class every time.
   Tracking is set without !important so it can still be overridden on its own.

   Line height is deliberately NOT set here: it interacts with surrounding
   layout, so it stays with the semantic classes above and the components.

   .nim-text-base-minus and .nim-text-md are gone along with their tokens —
   16px now resolves to --text-base (17px) and 18px to --text-base or
   --text-lg depending on the role.
   ========================================== */

.nim-text-4xl {
  font-size: var(--text-4xl);
  letter-spacing: var(--tracking-tighter);
}

.nim-text-3xl {
  font-size: var(--text-3xl);
  letter-spacing: var(--tracking-tighter);
}

.nim-text-2xl {
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-tight);
}

.nim-text-xl {
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-snug);
}

.nim-text-lg {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-normal);
}

.nim-text-base {
  font-size: var(--text-base) !important;
  letter-spacing: var(--tracking-normal);
}

.nim-text-sm {
  font-size: var(--text-sm) !important;
  letter-spacing: var(--tracking-wide);
}

.nim-text-xs {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
}


.nim-readable {
  max-width: 65ch;
  line-height: var(--leading-body);
  text-align: left;
  /*margin-left: auto;*/
  /*margin-right: auto;*/
}



.nim-readable blockquote {
    border-left: 3px solid #3b82f6;
    padding-left: 1em;
    margin-left: 0;
    margin-right: 0;
    color: #4b5563;

}
