/* Drew — global sheet. Tokens live in ihs-tokens.css; this file is fonts, reset,
   the type ramp, and the handful of surfaces every view repeats. Anything used by
   one view belongs in that view's .razor.css, not here. */

@import url("ihs-tokens.css");

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
/* Drew's signature. Self-hosted rather than hot-linked from Google: latin subset,
   v19, the same cut the mockups used. It appears in exactly two places — the sidebar
   wordmark and the briefing signature — and never on a heading, label or button.
   The fallbacks are script faces, so a miss still reads as a hand. */
@font-face {
  font-family: "Kaushan Script";
  src: url("fonts/kaushan-script-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --drew-signature: "Kaushan Script", "Segoe Script", "Brush Script MT", cursive;

  /* Values the design uses that the marketing-site tokens do not carry. */
  --ihs-sidebar-active: #0d0d0d;
  --ihs-sidebar-hover: #141414;
  --ihs-sidebar-rule: #1c1c1c;
  --ihs-sidebar-label: #4d4d4d;
  --ihs-row-hover: #fafbfc;
  --ihs-rule-inner: #f3f5f6;
  --ihs-blue-mid: #66c2ff;
  --ihs-blue-wash: #eaf6ff;
  --ihs-success-wash: #eaf9f0;
  --ihs-success-ink: #268a4e;
  --ihs-warning-wash: #fff4e8;
  --ihs-warning-ink: #a55c10;
  --ihs-warning-note-bg: #fffaf2;
  --ihs-warning-note-ink: #7a5518;
  --ihs-danger-wash: #fdeced;
  --ihs-danger-ink: #c03840;
  --ihs-danger-row: #fffaf9;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ihs-bg-muted);
}

body {
  font-family: var(--ihs-font);
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  color: var(--ihs-ink);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ihs-blue-tint); color: var(--ihs-ink); }

a { color: var(--ihs-blue); text-decoration: none; }
a:hover { color: var(--ihs-blue-hover); }

h1, h2, h3, h4 { font-weight: 400; color: var(--ihs-ink-heading); margin: 0; }
h1 { font-size: 36px; line-height: 46px; }
h2 { font-size: 20px; line-height: 28px; }
p { margin: 0; }

/* The lightness is the identity — never synthesize bold to "fix" a heading. */
strong, b { font-weight: 500; }

.mono { font-family: var(--ihs-font-mono); }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ihs-ink-muted); }
.faint { color: var(--ihs-nav-link); }

/* ---- Panel: the one repeating surface ---- */

.panel {
  background: var(--ihs-bg);
  border: 1px solid var(--ihs-border);
  padding: 22px 26px;
}
.panel.rail { padding: 18px 20px; }
.panel.accent-top { border-top: 2px solid var(--ihs-blue); }
.panel.accent-warning { border-left: 2px solid var(--ihs-warning); }
.panel.accent-danger { border-left: 2px solid var(--ihs-danger); }
.panel.accent-blue { border-left: 2px solid var(--ihs-blue); }
.panel.flush { padding: 0; }

.panel-caption {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ihs-ink-muted);
}
/* The gap is required: without it the caption and its right-hand note touch. */
.panel-caption.split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 22px;
}
.page-head .subhead {
  margin-top: 8px;
  font-size: 14px;
  line-height: 22px;
  color: var(--ihs-ink-muted);
  max-width: 820px;
  text-wrap: pretty;
}
.page-head .spacer { flex: 1; }

/* ---- Signal trace: shown wherever an inferred claim appears ---- */

.trace { display: flex; gap: 9px; }
.trace .rule {
  width: 2px;
  background: var(--ihs-blue-tint);
  flex: none;
}
.trace .lines {
  font-family: var(--ihs-font-mono);
  font-size: 11px;
  line-height: 18px;
  color: var(--ihs-ink-muted);
}

/* ---- Chips ---- */

.chip {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 7px;
  white-space: nowrap;
}
.chip.blue { background: var(--ihs-blue-wash); color: #0680d2; }
.chip.green { background: var(--ihs-success-wash); color: var(--ihs-success-ink); }
.chip.amber { background: var(--ihs-warning-wash); color: var(--ihs-warning-ink); }
.chip.red { background: var(--ihs-danger-wash); color: var(--ihs-danger-ink); }
.chip.neutral { background: var(--ihs-bg-muted); color: var(--ihs-ink-muted); }

/* SENT — the only status on a document that Drew cannot set for itself. It never emails an external
   party (C2), so a send is visible only because the copy came back through drew@, and it is a
   categorically stronger claim than "built" or "filed": the client has this in their hands. Given
   its own fill rather than reusing green, which already means "filed" two chips to the left. */
.chip.sent { background: var(--ihs-teal-wash, #e6f2f3); color: var(--ihs-teal, #0f5f66); }

/* Whose move it is, on a pursuit stage chip (§4.9). A left edge and an arrow rather than a
   different fill: the fill already carries how far the deal has got, and overloading it
   would make two facts fight for one channel. Colour is deliberately NOT the brand blue —
   this is about parties, not progress. */
.chip.owes-client { box-shadow: inset 3px 0 0 #9b5b14; }
.chip.owes-ihs { box-shadow: inset 3px 0 0 #0f5f66; }
.chip .chip-arrow {
  font-weight: 700;
  margin-right: 3px;
  opacity: .85;
}
.chip.count {
  background: var(--ihs-blue);
  color: #fff;
  padding: 1px 8px;
  font-size: 12px;
  letter-spacing: normal;
  text-transform: none;
}
.chip.count.bulk { background: var(--ihs-bg-muted); color: #292929; }

/* ---- Buttons: small and quiet ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--ihs-radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
}
.btn.dense { height: 28px; }
.btn.primary { background: var(--ihs-blue); border-color: var(--ihs-blue); color: #fff; }
.btn.primary:hover { background: var(--ihs-blue-hover); border-color: var(--ihs-blue-hover); }
.btn.secondary { background: #fff; border-color: var(--ihs-border); color: var(--ihs-ink); }
.btn.secondary:hover { border-color: var(--ihs-nav-link); }
.btn.ghost { background: transparent; color: var(--ihs-ink-muted); }
.btn.ghost:hover { color: var(--ihs-blue); }
.btn:disabled { cursor: default; opacity: .5; }
.btn:disabled:hover {
  background: var(--ihs-blue);
  border-color: var(--ihs-blue);
  color: #fff;
}
.btn.secondary:disabled:hover { background: #fff; border-color: var(--ihs-border); color: var(--ihs-ink); }

.linklike {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--ihs-blue);
  cursor: pointer;
}
.linklike:hover { color: var(--ihs-blue-hover); }

input[type="text"], input[type="search"], textarea {
  font-family: inherit;
  font-size: 13px;
  color: var(--ihs-ink);
  border: 1px solid var(--ihs-border);
  border-radius: var(--ihs-radius-input);
  padding: 6px 10px;
  background: #fff;
}
input::placeholder { color: var(--ihs-nav-link); }

/* ---- Empty and unknown states are shown, never hidden ---- */

.empty {
  font-style: italic;
  color: var(--ihs-nav-link);
}

.note-warning {
  background: var(--ihs-warning-note-bg);
  border-left: 2px solid var(--ihs-warning);
  padding: 10px 14px;
  font-size: 13px;
  line-height: 20px;
  color: var(--ihs-warning-note-ink);
}

.panel.error {
  border-left: 2px solid var(--ihs-danger);
  color: var(--ihs-danger-ink);
}

/* ---- Blazor plumbing ---- */

#blazor-error-ui {
  color-scheme: light only;
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}
#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}
.blazor-error-boundary {
  background: var(--ihs-danger);
  padding: 1rem;
  color: white;
}

/* Q41 — the web-research panel on an organization. */
.services { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.reasoning { margin: 10px 0; line-height: 1.55; color: var(--ink-2, #444); }
ul.sources { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
ul.sources li { overflow-wrap: anywhere; }

/* Drew's standing narrative — the deal page's (Q46) and the engagement page's (Q70).
   Global rather than scoped per page: both write the same kind of paragraph in the same
   voice, and the next-step line and the staleness warning had no styles at all until the
   second page needed them, so the deal page has been rendering them plain since Q46. */
.next {
    margin-top: 10px;
    font-size: 14px;
    line-height: 22px;
    color: var(--ihs-ink-body);
    text-wrap: pretty;
}
.nlabel {
    display: inline-block;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ihs-blue);
    border: 1px solid var(--ihs-blue);
    border-radius: 3px;
    padding: 0 5px;
    margin-right: 8px;
    vertical-align: 1px;
}
/* Prose that has fallen behind has to look like a warning, not like a footnote: it is
   believed precisely because it is written in Drew's voice. */
.stale { color: var(--ihs-danger-ink); font-weight: 600; }
