:root {
  --paper: #f6f7f8;
  --surface: #ffffff;
  --surface-alt: #eef2f5;
  --ink: #131920;
  --ink-soft: #3c4752;
  --muted: #5c6873;
  --line: #d4dce3;
  --line-strong: #b6c2cc;
  --brand: #0f4c5c;
  --brand-dark: #093540;
  --brand-soft: #e4eff2;
  --ok-fg: #146c43;
  --ok-bg: #eaf7ef;
  --ok-line: #bce3cb;
  --warn-fg: #854d0e;
  --warn-bg: #fef9c3;
  --warn-line: #f3d778;
  --bad-fg: #991b1b;
  --bad-bg: #fef2f2;
  --bad-line: #f4b8b8;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  color-scheme: light;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { margin: 0; }
main, .site-footer { max-width: 1180px; margin: 0 auto; padding: 20px 24px; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px max(24px, calc((100% - 1180px) / 2 + 24px));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand::before {
  content: "";
  width: 28px;
  height: 28px;
  background: url("favicon.svg") center / contain no-repeat;
}
.brand span { color: var(--brand); }

nav { display: flex; flex-wrap: wrap; gap: 6px; }
nav a {
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}
nav a:hover { background: var(--surface-alt); color: var(--ink); }
nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
nav a[href="#assistant"] { background: var(--brand); color: #fff; }
nav a[href="#assistant"]:hover { background: var(--brand-dark); }

.hero-band {
  display: grid;
  gap: 18px;
  padding: 8px 0 18px;
}
.eyebrow {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
}
h1 { margin: 0 0 8px; font-size: 1.9rem; letter-spacing: -0.025em; line-height: 1.2; }
h2 { margin: 0 0 6px; font-size: 1.18rem; letter-spacing: -0.015em; }
h3 { margin: 12px 0 6px; font-size: 0.98rem; }
.lede { margin: 0; max-width: 78ch; color: var(--ink-soft); font-size: 0.98rem; }

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.kpi-card dt { font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-card dd { margin: 4px 0 0; font-family: var(--mono); font-size: 1.25rem; font-weight: 700; }
.kpi-verdict.status-pass { color: var(--ok-fg); }
.kpi-verdict.status-review { color: var(--warn-fg); }
.kpi-verdict.status-blocked { color: var(--bad-fg); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 16px;
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.meta-line { margin: 2px 0 0; font-size: 0.88rem; color: var(--muted); }

.preset-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 6px 11px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}
.chip-btn:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }

.inspect-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.field-group { display: flex; flex-direction: column; gap: 5px; min-width: 210px; }
.field-group.grow { flex: 1 1 320px; }
label { font-size: 0.83rem; font-weight: 700; color: var(--ink-soft); }
input[type="text"], select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font: inherit;
  font-size: 0.92rem;
  background: var(--surface);
  color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

.form-actions { display: flex; gap: 8px; }
.primary-btn {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 7px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.primary-btn:hover { background: var(--brand-dark); }
.ghost-btn {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 7px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.ghost-btn:hover { background: var(--surface-alt); color: var(--ink); }

.feedback-line { margin: 10px 0 0; font-size: 0.88rem; color: var(--brand-dark); min-height: 1.2em; }
.feedback-line.error { color: var(--bad-fg); font-weight: 600; }

.manifest-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.table-wrap { overflow-x: auto; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.ledger-table th, .ledger-table td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ledger-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--paper);
}
.pkg-name { font-family: var(--mono); font-weight: 700; color: var(--ink); }
.pkg-sub { display: block; font-size: 0.77rem; color: var(--muted); }
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-compatible { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-line); }
.badge-review, .badge-unknown { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-line); }
.badge-conflict, .badge-vuln { background: var(--bad-bg); color: var(--bad-fg); border-color: var(--bad-line); }
.cve-item { display: block; font-family: var(--mono); font-size: 0.77rem; color: var(--bad-fg); margin-bottom: 3px; }
.mini-btn {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.mini-btn:hover { background: var(--brand-soft); border-color: var(--brand); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.rules-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rules-list li {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  font-size: 0.85rem;
}

.signoff-form { display: grid; gap: 11px; margin-top: 10px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; font-size: 0.86rem; cursor: pointer; }
.checkbox-row input { margin-top: 3px; width: auto; }
.signoff-history { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.signoff-history ul { margin: 6px 0; padding-left: 18px; font-size: 0.85rem; }
.report-preview {
  max-height: 220px;
  overflow: auto;
  background: #131920;
  color: #e6edf3;
  padding: 12px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 0.76rem;
  white-space: pre-wrap;
}

.site-footer { border-top: 1px solid var(--line); margin-top: 32px; color: var(--muted); font-size: 0.85rem; }
.site-footer a { color: var(--brand); }

/* Cognizant Agentic Web Assistant section & official runtime overrides */
.assistant {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.assistant-note { font-size: 0.85rem; color: var(--muted); margin: 4px 0 10px; }
#assistant-status {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 600;
}

#agent-app {
  --ns-font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --ns-bg: #ffffff;
  --ns-fg: #131920;
  --ns-primary: #0f4c5c;
  --ns-accent: #0f4c5c;
  --ns-border: #d4dce3;
  --ns-panelbg: #ffffff;
  --ns-msgbg: #f1f5f8;
  --ns-muted: #5c6873;
}
.assistant-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 16px;
  margin-top: 16px;
}
#agent-app.ns-composed-app [data-ns-slot="chat"] { height: 700px; }
#agent-app .ns-chat { background: var(--ns-bg); }
#agent-app input[type="checkbox"],
#agent-app input[type="radio"] { width: auto; }
#agent-app .ns-header { flex-wrap: wrap; }
#agent-app .ns-settings-body label { margin: 4px 0; font-weight: 400; }
#agent-app .ns-w-label { font-family: inherit; }
#agent-app .ns-widget label { margin: 0; }
#agent-app .ns-w-radio label,
#agent-app .ns-w-multi label,
#agent-app .ns-w-toggle { font-weight: 400; font-size: 13px; }
#agent-app button { margin: 0; }
#agent-app .ns-w-choice { color: var(--ns-fg); }
#agent-app .ns-devtoggle:not(.on):hover,
#agent-app .ns-modal-close:hover { background: transparent; }
#agent-app .ns-w-choice:disabled:hover { background: #fafbfc; }
#agent-app .ns-consent { background: #fffbeb; }
#agent-app .ns-msgs:has(.ns-consent-actions) > .ns-turn-status { display: none; }
#agent-app .ns-msg { overflow-wrap: break-word; }
#agent-app .ns-consent-actions { flex-wrap: wrap; }
#agent-app .ns-consent-actions button { white-space: nowrap; }

body > dialog h2 { margin: 0 0 12px; font: 700 1.2em system-ui, sans-serif; }
body > dialog button { margin-right: 8px; }
.assistant-review {
  max-width: 640px;
  width: 85%;
  max-height: 85vh;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 24px;
  font: 15px system-ui, sans-serif;
}
.assistant-review dl { display: grid; grid-template-columns: fit-content(40%) 1fr; gap: 6px 16px; margin: 12px 0; }
.assistant-review dt { font-weight: 700; }
.assistant-review dd { margin: 0; overflow-wrap: anywhere; }
.assistant-review details { margin: 12px 0; }
.assistant-review pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-review .assistant-decline { background: transparent; color: inherit; border: 1px solid currentColor; }

@media (max-width: 900px) {
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .assistant-panels { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .assistant-review dl { grid-template-columns: 1fr; gap: 0; }
  .assistant-review dd { margin-bottom: 8px; }
}
