/* HCLTech branding and the intelligence views. Loaded after style.css, so these rules win. */
:root { --accent: #0f5fdc; --accent-wash: #e8f0fd; --navy: #0a1f5c; --page: #f4f6fa; --surface: #ffffff; --surface-2: #eef1f7; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) { --accent: #6da7ec; --accent-wash: #1d2a3b; --navy: #e8f0fd; --page: #121211; --surface: #1a1a19; --surface-2: #232321; }
}
:root[data-theme="dark"] { --accent: #6da7ec; --accent-wash: #1d2a3b; --navy: #e8f0fd; --page: #121211; --surface: #1a1a19; --surface-2: #232321; }

.logo { background-color: #0f5fdc; }
.hcl { font-weight: 800; font-size: 20px; letter-spacing: -.03em; background: linear-gradient(90deg, #6a2bd9, #0f5fdc 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hcl.small { font-size: 13px; }
.divider { width: 1px; height: 26px; background: var(--line); }
.brand { gap: 12px; }
.brand .name { display: flex; flex-direction: column; line-height: 1.15; }
.brand .name .sub { margin: 0; font-size: 11px; color: var(--text-3); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 18px 24px; border-top: 1px solid var(--line); margin-top: 8px; text-align: left; }
.foot .built { display: inline-flex; align-items: center; gap: 8px; }
h1 { margin: 0; }
.primary { background: var(--accent); color: #fff; }

/* executive summary */
.exec { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.exec-main { color: #fff; background: linear-gradient(135deg, #0a1f5c, #0f5fdc); border-radius: 14px; padding: 24px 28px; box-shadow: var(--shadow); }
.exec-main.CRITICAL { box-shadow: 0 0 0 3px var(--critical), var(--shadow); }
.exec-main.ELEVATED { box-shadow: 0 0 0 3px var(--serious), var(--shadow); }
.exec-main .eyebrow { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; font-weight: 600; }
.exec-main h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.02em; margin: 8px 0; font-weight: 700; max-width: 34ch; }
.exec-action { font-size: 15px; opacity: .95; }
.exec-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.exec-facts .pill { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 550; display: inline-flex; gap: 6px; align-items: center; }
.exec-facts .pill.alert { background: #fff; color: #a32323; border-color: #fff; }
.tagline { margin-top: 18px; font-size: 12.5px; opacity: .75; font-style: italic; }
.exec-priority { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prio { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); border-top: 4px solid var(--line); }
.prio .k { color: var(--text-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.prio .v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; color: var(--navy); }
.prio .d { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.prio.CRITICAL { border-top-color: var(--critical); background: color-mix(in srgb, var(--critical) 6%, var(--surface)); }
.prio.CRITICAL .v { color: var(--critical-ink); }
.prio.ELEVATED { border-top-color: var(--serious); background: color-mix(in srgb, var(--serious) 7%, var(--surface)); }
.prio.ELEVATED .v { color: var(--serious-ink); }
.prio.WATCH { border-top-color: var(--warning); }
.prio.MONITORING { border-top-color: var(--good); }
.prio.blue { border-top-color: var(--accent); }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.trend.up { color: var(--critical-ink); }
.trend.down { color: var(--good-ink); }
.trend.flat { color: var(--text-3); }

/* workflow story */
.story { display: grid; gap: 10px; }
.flow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.flow .st { padding: 12px 14px 12px 22px; position: relative; border-right: 1px solid var(--line); }
.flow .st:last-child { border-right: 0; }
.flow .st .n { font-size: 22px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.flow .st .l { font-size: 12px; color: var(--text-2); font-weight: 550; }
.flow .st.zero .n { color: var(--text-3); }
.flow .st .arr { position: absolute; left: 6px; top: 14px; color: var(--accent); font-size: 14px; }
.flow .st.active { background: var(--accent-wash); }
.secondary { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--text-2); font-size: 12.5px; padding: 0 4px; }
.secondary b { color: var(--text); font-variant-numeric: tabular-nums; }

/* risk list and the AI panel */
.risk-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.incident.selected { outline: 0; background: var(--accent-wash); border-color: var(--accent); border-width: 2px 2px 2px 6px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.incident.CRITICAL:not(.selected) { background: color-mix(in srgb, var(--critical) 5%, var(--surface)); }
.why { position: sticky; top: 76px; border: 2px solid var(--accent); border-radius: 12px; background: var(--accent-wash); padding: 16px 18px; display: grid; gap: 14px; }
.why .head { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.why h3 { margin: 0 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.why .reason { color: var(--text); font-size: 13.5px; line-height: 1.55; }
.why .evi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.why .evi div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.why .evi b { display: block; font-size: 22px; color: var(--navy); font-variant-numeric: tabular-nums; }
.why .evi span { font-size: 12px; color: var(--text-2); }
.why .rec { background: var(--surface); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; }
.why ol { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.why .none { color: var(--text-3); }
.strength { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.strength .bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.strength .bar span { display: block; height: 100%; background: var(--accent); }

/* impact chain */
.chain { display: flex; flex-wrap: wrap; align-items: stretch; margin-bottom: 18px; }
.chain .node { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--surface-2); min-width: 150px; }
.chain .node b { display: block; font-size: 14px; }
.chain .node span { font-size: 12px; color: var(--text-2); display: block; }
.chain .node.at_risk { border: 2px solid var(--critical); background: color-mix(in srgb, var(--critical) 8%, var(--surface)); }
.chain .node.at_risk.ELEVATED { border-color: var(--serious); background: color-mix(in srgb, var(--serious) 9%, var(--surface)); }
.chain .arrow { padding: 0 8px; color: var(--text-3); font-size: 18px; align-self: center; }
.chain .end { background: #0a1f5c; color: #fff; border-color: #0a1f5c; }
.chain .end span { color: rgba(255, 255, 255, .8); }
.chain .empty { width: 100%; }

/* key moments and outcome tiles */
.moments { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.moment { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-wash); border: 1px solid var(--accent); color: var(--navy); border-radius: 999px; padding: 3px 12px 3px 4px; font-size: 12.5px; font-weight: 550; }
.moment i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.outcomes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.outcomes .tile { box-shadow: none; background: var(--accent-wash); border-color: transparent; }
.outcomes .tile .v { color: var(--navy); }
.outcomes .tile.na .v { color: var(--text-3); font-size: 18px; }

@media (max-width: 980px) {
  .exec, .risk-layout { grid-template-columns: 1fr; }
  .why { position: static; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow .st { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) { .exec-priority { grid-template-columns: 1fr; } .exec-main h1 { font-size: 22px; } .brand .name .sub, .divider { display: none; } }
.exec-facts .trend { color: #fff; }

/* technician observations */
.lead { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.lead .big { background: linear-gradient(135deg, #0a1f5c, #0f5fdc); color: #fff; border-radius: 12px; padding: 14px 18px; }
.lead .big .k { font-size: 12px; opacity: .85; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.lead .big .v { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; }
.lead .big .d { font-size: 12.5px; opacity: .9; }
.lead .tile { box-shadow: none; background: var(--accent-wash); border-color: transparent; }
.lead .tile .v { color: var(--navy); }
.lead .tile .v.sm { font-size: 17px; line-height: 1.5; }
.lead .empty { grid-column: 1 / -1; }
.trail { display: grid; gap: 0; border-left: 3px solid var(--c-employee); margin-left: 6px; }
.note { display: grid; grid-template-columns: 150px 14px minmax(0, 1fr); gap: 12px; padding: 10px 0 10px 12px; align-items: start; position: relative; }
.note .when { display: flex; flex-direction: column; font-size: 12.5px; text-align: right; }
.note .when span { color: var(--text-3); font-size: 12px; }
.note .dot { margin-top: 5px; }
.note .body p { color: var(--text-2); margin-top: 2px; }
.sig.tech { border-left: 3px solid var(--c-employee); background: color-mix(in srgb, var(--c-employee) 7%, transparent); padding-left: 8px; }
.chips .chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (max-width: 980px) { .lead { grid-template-columns: 1fr 1fr; } .lead .big { grid-column: 1 / -1; } .note { grid-template-columns: 1fr; } .note .when { text-align: left; flex-direction: row; gap: 8px; } .note .dot { display: none; } }
