/* ==========================================================================
   BLUEFRONT AI  /  /services/decision-intelligence
   Concept: "The triage view"  a master detail inbox of signals.
   Everything scoped under .pg-decision-intelligence. Colour via CSS vars only.
   ========================================================================== */

/* ---- brand fallbacks (site provides the real values) ---- */
:root {
  --bg: #fff;
  --surface: #f3f7ff;
  --card: #fff;
  --ink: #0b1b3f;
  --muted: #4a5a7d;
  --border: #e1e9f7;
  --accent: #1d5bff;
  --accent-fill: #1d5bff;
  --accent-soft: #e8efff;
  --navy: #0a1c4a;
  --ink-rgb: 11, 27, 63;
  --accent-rgb: 29, 91, 255;
}
html[data-theme="dark"] {
  --bg: #071022;
  --surface: #0a1530;
  --card: #0e1c3f;
  --ink: #f1f5ff;
  --muted: #aab8d8;
  --border: #1f2f5a;
  --accent: #4a86ff;
  --accent-fill: #2d62e8;
  --accent-soft: #14275a;
  --navy: #081735;
  --ink-rgb: 255, 255, 255;
  --accent-rgb: 74, 134, 255;
}

/* ========================================================================== */

.pg-decision-intelligence {
  --dc-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --dc-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --dc-amber-soft: rgba(196, 132, 0, 0.14);
  --dc-amber-ink: #8a5300;
  --dc-rerun: rgba(var(--accent-rgb), 0.1);
  --dc-max: 1160px;
  --dc-top: 100px;

  position: relative;
  padding-top: var(--dc-top);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--dc-sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
html[data-theme="dark"] .pg-decision-intelligence {
  --dc-amber-soft: rgba(242, 197, 107, 0.16);
  --dc-amber-ink: #f2c56b;
}

:where(.pg-decision-intelligence) *,
:where(.pg-decision-intelligence) *::before,
:where(.pg-decision-intelligence) *::after { box-sizing: border-box; }

:where(.pg-decision-intelligence) h1,
:where(.pg-decision-intelligence) h2,
:where(.pg-decision-intelligence) h3 { margin: 0; font-family: var(--dc-sans); color: var(--ink); }
:where(.pg-decision-intelligence) p { margin: 0; }
:where(.pg-decision-intelligence) a { color: inherit; }
:where(.pg-decision-intelligence) ul { margin: 0; padding: 0; list-style: none; }

.dc-wrap {
  width: 100%;
  max-width: var(--dc-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- shared type ---- */
.dc-overline {
  font: 600 11px/1.4 var(--dc-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.dc-crumb {
  font: 500 12px/1.4 var(--dc-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
}
.dc-crumb span { color: rgba(var(--ink-rgb), 0.38); }

.dc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.dc-h1 {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.dc-h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.dc-lede { color: var(--muted); font-size: 17px; max-width: 60ch; }
.dc-note { color: var(--muted); font: 500 13px/1.5 var(--dc-mono); letter-spacing: 0.02em; }

.dc-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font: 600 12px/1 var(--dc-mono);
  letter-spacing: 0.04em;
}
.dc-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- sections ---- */
.dc-sec { padding: 84px 0; }
.dc-sec--band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.dc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 38px;
}
.dc-head h2 { margin-top: 12px; }

/* ---- reveal (JS only) ---- */
.dc-js .dc-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.dc-js .dc-reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   HERO  +  app frame (master detail inbox)
   ========================================================================== */
.dc-hero { padding: 24px 0 84px; }
.dc-hero__lede { margin-top: 20px; }
.dc-hero > .dc-wrap > .dc-crumb { margin-bottom: 22px; }
.dc-hero > .dc-wrap > .dc-overline { margin-bottom: 14px; }
.dc-hero .dc-note { margin-top: 16px; }

.dc-app {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 26px 60px -34px rgba(var(--ink-rgb), 0.42);
  overflow: hidden;
}
.dc-app__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.dc-dots { display: inline-flex; gap: 6px; }
.dc-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(var(--ink-rgb), 0.16); }
.dc-app__title {
  font: 600 12px/1 var(--dc-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.dc-app__example {
  margin-left: auto;
  font: 600 11px/1 var(--dc-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dc-amber-ink);
  background: var(--dc-amber-soft);
  border: 1px solid rgba(196, 132, 0, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
}

.dc-app__body { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; min-height: 384px; }

/* ---- master list ---- */
.dc-list {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--card);
}
.dc-sig {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-family: var(--dc-sans);
  cursor: pointer;
  transition: background 0.18s ease;
}
.dc-sig:last-child { border-bottom: 0; }
.dc-sig > * { position: relative; z-index: 1; }
.dc-sig::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-soft);
  opacity: 0;
  pointer-events: none;
}
.dc-js .dc-sig::after { animation: dc-glow 1s ease-out both; }
.dc-sig:nth-child(1)::after { animation-delay: 0.05s; }
.dc-sig:nth-child(2)::after { animation-delay: 0.28s; }
.dc-sig:nth-child(3)::after { animation-delay: 0.51s; }
.dc-sig:nth-child(4)::after { animation-delay: 0.74s; }
@keyframes dc-glow { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }

.dc-sig:hover { background: var(--surface); }
.dc-sig[aria-selected="true"] { background: var(--accent-soft); }
.dc-sig[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.dc-sig:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.dc-sig__num {
  font: 600 13px/1 var(--dc-mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.dc-sig[aria-selected="true"] .dc-sig__num { color: var(--accent); }
.dc-sig__body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.dc-sig__title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.dc-sig__caret { color: var(--muted); display: inline-flex; transition: transform 0.2s ease; }
.dc-sig[aria-selected="true"] .dc-sig__caret { color: var(--accent); transform: translateX(2px); }

.dc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 999px;
  font: 600 11px/1.3 var(--dc-mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.dc-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dc-status--review { background: var(--accent-soft); color: var(--accent); }
.dc-status--wait { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.dc-status--exc { background: var(--dc-amber-soft); color: var(--dc-amber-ink); }

/* ---- detail pane ---- */
.dc-detail {
  padding: 30px 34px;
  background: var(--card);
  display: flex;
  flex-direction: column;
}
.dc-detail:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.dc-js .dc-detail__inner.is-swap { animation: dc-swap 0.38s ease both; }
@keyframes dc-swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.dc-detail__top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.dc-detail__kicker { font: 600 11px/1 var(--dc-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.dc-detail__title { margin-top: 16px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.dc-detail__context { margin-top: 14px; color: var(--muted); font-size: 15px; max-width: 62ch; }
.dc-detail__chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.dc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font: 500 12px/1.3 var(--dc-mono);
}
.dc-chip svg { color: var(--accent); flex: none; }
.dc-detail__note { margin-top: auto; padding-top: 24px; color: var(--muted); font: 500 12px/1.5 var(--dc-mono); }

/* ==========================================================================
   WHAT YOU RECEIVE  panel headers
   ========================================================================== */
.dc-receive { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dc-panel {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}
.dc-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.dc-panel__index { font: 600 11px/1 var(--dc-mono); letter-spacing: 0.18em; color: var(--muted); }
.dc-panel__mark { color: var(--accent); display: inline-flex; }
.dc-panel__title { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.dc-panel__text { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ==========================================================================
   WEEKLY RHYTHM  Mon to Fri
   ========================================================================== */
.dc-week {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 0;
}
.dc-day { position: relative; padding: 30px 14px 6px; }
.dc-day::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--border);
}
.dc-day.is-set::before { background: var(--accent); border-color: var(--accent); }
.dc-day__name {
  display: block;
  font: 600 11px/1 var(--dc-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.dc-day.is-set .dc-day__name { color: var(--ink); }
.dc-day__pill {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 12px/1 var(--dc-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.dc-day__text { margin-top: 12px; color: var(--muted); font-size: 14px; }

/* ==========================================================================
   QUESTIONS THIS ANSWERS
   ========================================================================== */
.dc-questions {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  padding: 34px;
  max-width: 820px;
}
.dc-questions__head { margin-bottom: 24px; }
.dc-questions__head h2 { margin-top: 12px; }
.dc-checklist { display: flex; flex-direction: column; gap: 2px; }
.dc-check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 4px;
  border-top: 1px solid var(--border);
  font-size: 16px;
}
.dc-check:first-child { border-top: 0; }
.dc-check__box {
  flex: none;
  margin-top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

/* ==========================================================================
   RELATED  small tabs
   ========================================================================== */
.dc-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.dc-tabs__label {
  font: 600 11px/1 var(--dc-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 8px;
}
.dc-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.dc-tab:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.dc-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.dc-tab svg { color: currentColor; }

/* ==========================================================================
   CTA  notification banner
   ========================================================================== */
.dc-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px 22px 30px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 22px 50px -30px rgba(var(--ink-rgb), 0.4);
}
.dc-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.dc-banner__icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.dc-banner__text { flex: 1 1 auto; min-width: 0; }
.dc-banner__label { font: 600 11px/1 var(--dc-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.dc-banner__sub { margin-top: 6px; font-size: 16px; font-weight: 500; }
.dc-banner__btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease;
}
.dc-banner__btn:hover { background: var(--navy); }
.dc-banner__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 920px) {
  .dc-sec { padding: 66px 0; }
  .dc-receive { grid-template-columns: 1fr; }
  .dc-questions { padding: 26px; }
}

@media (max-width: 760px) {
  .pg-decision-intelligence { --dc-top: 88px; }
  .dc-app__body { grid-template-columns: 1fr; min-height: 0; }
  .dc-list {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .dc-sig {
    flex: 0 0 auto;
    min-width: 216px;
    scroll-snap-align: start;
    border: 1px solid var(--border);
    border-radius: 14px;
  }
  .dc-sig::before { display: none; }
  .dc-sig__caret { display: none; }
  .dc-detail { padding: 24px 20px; }

  .dc-week {
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 0;
    border-left: 1px solid var(--border);
    margin-left: 6px;
  }
  .dc-day { padding: 14px 0 14px 24px; }
  .dc-day::before { top: 18px; left: -6px; }
  .dc-day--empty { display: none; }
}

@media (max-width: 560px) {
  .dc-wrap { padding: 0 18px; }
  .dc-detail__top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .dc-banner { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; }
  .dc-banner__btn { width: 100%; justify-content: center; }
  .dc-tab { flex: 1 1 auto; justify-content: center; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  :where(.pg-decision-intelligence) *,
  :where(.pg-decision-intelligence) *::before,
  :where(.pg-decision-intelligence) *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .dc-js .dc-reveal { opacity: 1; transform: none; }
}
