/* ============================================================
   BASE — resets + signature SFG/CommsOS utility classes.
   These are the recurring "grammar" pieces of the brand:
   mono eyebrows, editorial serif headings, hairline panels,
   the live signal dot, status pills.
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-strong);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01";
  accent-color: var(--teal-deep);
}

/* ---- Links ---- */
a { color: var(--accent-strong); text-decoration: underline; text-decoration-color: rgba(15, 127, 114, 0.4); text-underline-offset: 2px; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--teal-ink); text-decoration-color: currentColor; }

/* ---- Keyboard focus (visible ring, teal) ---- */
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---- Brand wordmark ---- */
.cos-wordmark {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* ---- Editorial serif headings (Cormorant) ---- */
.cos-serif { font-family: var(--font-serif); font-weight: var(--weight-medium); }
.cos-display-1 { font-family: var(--font-serif); font-weight: var(--weight-medium);
  font-size: var(--display-1); line-height: var(--leading-tight); letter-spacing: -0.01em; }
.cos-display-2 { font-family: var(--font-serif); font-weight: var(--weight-medium);
  font-size: var(--display-2); line-height: 1.08; }
.cos-display-3 { font-family: var(--font-serif); font-weight: var(--weight-semibold);
  font-size: var(--display-3); line-height: var(--leading-snug); }
.cos-display-1, .cos-display-2, .cos-display-3 { text-wrap: balance; }

/* ---- Signature eyebrow / kicker (sans caps, tracked) ----
   v3: the eyebrow speaks sans. Mono at display-adjacent size reads as terminal
   output, and the app already made this call in bridge.css — "labels speak
   sans; mono is data only". This aligns the design system to it. */
.cos-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent-strong);
}
.cos-eyebrow-line {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.cos-eyebrow-line::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--accent-strong);
}

/* ---- Mono section label ---- */
.cos-label {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Mono data ---- */
.cos-mono { font-family: var(--font-mono); letter-spacing: 0; }

/* ---- Body text helpers ---- */
.cos-lead { font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--text-body); }
.cos-body { font-size: var(--text-base); line-height: var(--leading-normal); color: var(--text-body); }
.cos-lead, .cos-body, p { text-wrap: pretty; }

/* ---- Hairline panel / card ---- */
.cos-panel {
  background: var(--surface-card);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.cos-card {
  background: var(--surface-card);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
}
.cos-card-accent { border-left: var(--border-accent-w) solid var(--accent); }

/* ---- Pull quote ---- */
.cos-pullquote {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: var(--text-2xl);
  line-height: 1.4;
  border-left: var(--border-accent-w) solid var(--accent);
  padding-left: 22px;
  color: var(--text-strong);
}

/* ---- Live signal dot ---- */
.cos-live-dot {
  display: inline-flex;
  width: 10px; height: 10px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: rgba(99, 112, 131, 0.35);
}
.cos-live-dot.is-active {
  background: var(--teal-bright);
  box-shadow: var(--glow-teal);
}

/* ---- Status pill ---- */
.cos-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid var(--accent);
  background: var(--accent-wash);
  color: var(--accent-strong);
}
/* Full ink/tint/border triad per state. The border was previously inlined here
   as rgba(…,0.4), which disagreed with the opaque hexes the app shipped; the
   opaque values won and are now tokens. Text is -ink, never the base state
   colour — --ready fails AA on its own tint. */
.cos-status.is-ready   { border-color: var(--ready-border);   background: var(--ready-tint);   color: var(--ready-ink); }
.cos-status.is-caution { border-color: var(--caution-border); background: var(--caution-tint); color: var(--caution-ink); }
.cos-status.is-blocked { border-color: var(--blocked-border); background: var(--blocked-tint); color: var(--blocked-ink); }

/* ---- Gradient text (teal) ---- */
.cos-grad-text {
  background: var(--teal-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

::selection { background: rgba(15, 127, 114, 0.18); color: var(--navy); }
