/* Inicio agenda: family identity is independent of KPI and validation status. */
#homeView :is(.home-simple-decision, .home-compact-decision) {
  --home-family-accent: #234a74;
  --home-family-ink: #234a74;
  --home-family-header: var(--home-family-accent);
  --home-family-header-text: #fff;
  --home-family-wash: color-mix(in srgb, var(--home-family-accent) 7%, white);
  --home-family-line: color-mix(in srgb, var(--home-family-accent) 22%, #dce2e9);
  --home-simple-accent: var(--home-family-accent);
  --home-compact-accent: var(--home-family-accent);
}

#homeView :is(.home-simple-decision, .home-compact-decision).sales {
  --home-family-accent: #0866d9;
  --home-family-ink: #0753b1;
}
#homeView :is(.home-simple-decision, .home-compact-decision).operations {
  --home-family-accent: #008c95;
  --home-family-ink: #006a71;
  /* A deeper header keeps its white labels above 4.5:1 contrast. */
  --home-family-header: #007b84;
}
#homeView :is(.home-simple-decision, .home-compact-decision).commercial {
  --home-family-accent: #7148c8;
  --home-family-ink: #603ab0;
}
#homeView :is(.home-simple-decision, .home-compact-decision):is(.inventory, .logistics) {
  --home-family-accent: #b66a08;
  --home-family-ink: #78420d;
  --home-family-header: #edab48;
  --home-family-header-text: #261b0c;
}
#homeView :is(.home-simple-decision, .home-compact-decision).reviews {
  --home-family-accent: #af3276;
  --home-family-ink: #972865;
}
#homeView :is(.home-simple-decision, .home-compact-decision).market {
  --home-family-accent: #4b59bb;
  --home-family-ink: #414fa7;
}
#homeView :is(.home-simple-decision, .home-compact-decision).financial {
  --home-family-accent: #14764a;
  --home-family-ink: #10633e;
}
#homeView :is(.home-simple-decision, .home-compact-decision).system {
  --home-family-accent: #596579;
  --home-family-ink: #465265;
}

#homeView .home-cockpit-featured-heading {
  gap: 8px 16px;
  align-items: baseline;
}
#homeView .home-cockpit-featured-heading > span {
  color: #234a74;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
#homeView .home-cockpit-featured-heading > small {
  color: #596579;
  font-size: 13px;
  line-height: 1.5;
}
#homeView .home-cockpit-decision-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
}
#homeView .home-cockpit-decision-grid .home-simple-decision {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 0;
  padding: 0;
  overflow: hidden;
  color: #1b2236;
  background: #fff;
  border: 1px solid var(--home-family-line);
  border-top: 4px solid var(--home-family-accent);
  border-radius: 14px;
  box-shadow: 0 5px 18px rgb(16 27 45 / 6%);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
#homeView .home-cockpit-decision-grid .home-simple-decision:hover,
#homeView .home-cockpit-decision-grid .home-simple-decision:focus-visible {
  background: #fff;
  border-color: var(--home-family-accent);
  box-shadow: 0 9px 24px rgb(16 27 45 / 11%);
  transform: translateY(-2px);
}
#homeView .home-cockpit-decision-grid .home-simple-decision:focus-visible {
  outline: 3px solid #101b2d;
  outline-offset: 3px;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-head {
  display: flex;
  width: 100%;
  align-self: stretch;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  margin: 0;
  padding: 16px 20px;
  color: var(--home-family-header-text);
  background: var(--home-family-header);
}
#homeView .home-cockpit-decision-grid .home-simple-decision-rank {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  color: var(--home-family-ink);
  background: #fff;
  border: 0;
  border-radius: 10px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-area {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: var(--home-family-header-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-area > i {
  flex: 0 0 auto;
  font-size: 18px;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-arrow,
#homeView .home-cockpit-decision-grid .home-simple-decision:hover .home-simple-decision-arrow,
#homeView .home-cockpit-decision-grid .home-simple-decision:focus-visible .home-simple-decision-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--home-family-header-text);
  font-size: 19px;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-main {
  display: grid;
  gap: 13px;
  min-width: 0;
  margin: 0;
  padding: 23px 22px 20px;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-main h3 {
  margin: 0;
  color: #1b2236;
  font-size: clamp(21px, 1.5vw, 23px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.015em;
  overflow-wrap: break-word;
  text-wrap: pretty;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-dealership {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 5px 9px;
  color: #465265;
  background: #f1f4f7;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-outcome {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  color: #1b2236;
  background: transparent;
  border: 0;
  font-size: 14px;
  line-height: 1.5;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-outcome small {
  color: #596579;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-signal {
  margin: 0;
  color: #596579;
  font-size: 14px;
  line-height: 1.6;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-action {
  display: grid;
  gap: 9px;
  margin: auto 20px 20px;
  padding: 16px;
  color: #1b2236;
  background: var(--home-family-wash);
  border: 1px solid var(--home-family-line);
  border-left: 3px solid var(--home-family-accent);
  border-radius: 9px;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-action > span {
  color: var(--home-family-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: none;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-action > strong {
  color: #1b2236;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 22px 20px;
  padding: 16px 0 0;
  border-top: 1px solid #dce2e9;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-meta small {
  color: #596579;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-transform: none;
}
#homeView .home-cockpit-decision-grid .home-simple-decision-meta strong {
  color: #1b2236;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

/* The rest of the ranked agenda keeps its horizontal reading order. */
#homeView .home-cockpit-more-count {
  color: #fff;
  background: #234a74;
  border: 0;
  font-size: 15px;
}
#homeView .home-compact-decision-grid {
  min-width: 0;
  background: #fff;
  border: 1px solid #dce2e9;
  border-radius: 13px;
  box-shadow: 0 4px 16px rgb(16 27 45 / 4%);
}
#homeView .home-compact-decision {
  grid-template-columns: 38px minmax(0, 1fr) minmax(0, .8fr) minmax(110px, .35fr) 18px;
  align-items: start;
  gap: 20px;
  min-width: 0;
  padding: 24px 22px 24px 20px;
  color: #1b2236;
  background: #fff;
  border-left: 4px solid var(--home-family-accent);
  border-bottom: 1px solid #dce2e9;
  transition: background-color 160ms ease;
}
#homeView .home-compact-decision:hover,
#homeView .home-compact-decision:focus-visible {
  background: var(--home-family-wash);
}
#homeView .home-compact-decision:focus-visible {
  outline: 3px solid #101b2d;
  outline-offset: -3px;
}
#homeView .home-compact-decision-rank {
  width: 36px;
  height: 36px;
  color: var(--home-family-header-text);
  background: var(--home-family-header);
  border: 0;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#homeView .home-compact-decision-kicker { gap: 8px 10px; margin-bottom: 10px; }
#homeView .home-compact-decision-kicker > span {
  color: #596579;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-transform: none;
}
#homeView .home-compact-decision-kicker > span:first-child {
  gap: 6px;
  padding: 4px 8px;
  color: var(--home-family-ink);
  background: var(--home-family-wash);
  border-radius: 5px;
  font-weight: 700;
}
#homeView .home-compact-decision-body h3 {
  color: #1b2236;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  text-wrap: pretty;
}
#homeView .home-compact-decision-body p {
  margin-top: 9px;
  color: #596579;
  font-size: 14px;
  line-height: 1.55;
}
#homeView .home-compact-decision-step {
  gap: 9px;
  padding-left: 18px;
  border-left: 1px solid var(--home-family-line);
}
#homeView .home-compact-decision-step > span {
  color: var(--home-family-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: none;
}
#homeView .home-compact-decision-owner > small {
  color: #596579;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
}
#homeView .home-compact-decision-step > strong,
#homeView .home-compact-decision-owner > strong {
  color: #1b2236;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}
#homeView .home-compact-decision-arrow,
#homeView .home-compact-decision:hover .home-compact-decision-arrow,
#homeView .home-compact-decision:focus-visible .home-compact-decision-arrow {
  color: var(--home-family-ink);
  font-size: 19px;
}

/* Validation remains explicit; an orange family never implies a warning. */
#homeView .home-cockpit-more[aria-labelledby="homePendingDecisionsTitle"] {
  padding-top: 22px;
  border-top: 1px dashed #aeb8c6;
}
#homeView .home-compact-decision-kicker > span.home-compact-validation,
#homeView .home-decision-validation-note {
  color: #704a15;
  background: #fff5e2;
  border: 1px solid #e6c98c;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
}
#homeView .home-compact-decision-kicker > span.home-compact-validation { padding: 4px 8px; }
#homeView .home-decision-validation-note strong,
#homeView .home-decision-validation-note > span {
  color: #704a15;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1280px) {
  #homeView .home-compact-decision {
    grid-template-columns: 38px minmax(0, 1fr) minmax(0, .85fr) 18px;
    gap: 18px;
  }
  #homeView .home-compact-decision-owner {
    grid-column: 2 / 4;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
  }
  #homeView .home-compact-decision-arrow { grid-column: 4; grid-row: 1; }
}

@media (max-width: 1099px) {
  #homeView .home-cockpit-decision-grid { grid-template-columns: 1fr; gap: 18px; }
  #homeView .home-cockpit-decision-grid .home-simple-decision-head { min-height: 72px; }
}

@media (max-width: 900px) {
  #homeView .home-compact-decision { grid-template-columns: 36px minmax(0, 1fr) 18px; gap: 16px; }
  #homeView .home-compact-decision-step {
    grid-column: 2;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid var(--home-family-line);
  }
  #homeView .home-compact-decision-owner { grid-column: 2; }
  #homeView .home-compact-decision-arrow { grid-column: 3; grid-row: 1; }
}

@media (max-width: 600px) {
  #homeView .home-cockpit-featured-heading { align-items: flex-start; flex-direction: column; }
  #homeView .home-cockpit-decision-grid .home-simple-decision { padding: 0; border-radius: 12px; }
  #homeView .home-cockpit-decision-grid .home-simple-decision-head { gap: 11px; padding: 14px 18px; }
  #homeView .home-cockpit-decision-grid .home-simple-decision-rank { width: 38px; height: 38px; flex-basis: 38px; font-size: 18px; }
  #homeView .home-cockpit-decision-grid .home-simple-decision-area { font-size: 13px; }
  #homeView .home-cockpit-decision-grid .home-simple-decision-main { padding: 20px 18px 18px; }
  #homeView .home-cockpit-decision-grid .home-simple-decision-main h3 { font-size: 21px; }
  #homeView .home-cockpit-decision-grid .home-simple-decision-action { margin: auto 16px 18px; padding: 14px; }
  #homeView .home-cockpit-decision-grid .home-simple-decision-meta { gap: 12px; margin: 0 18px 18px; }
  #homeView .home-compact-decision { grid-template-columns: 32px minmax(0, 1fr) 16px; gap: 12px; padding: 20px 14px 20px 12px; }
  #homeView .home-compact-decision-rank { width: 32px; height: 32px; border-radius: 8px; font-size: 14px; }
  #homeView .home-compact-decision-kicker { gap: 7px; }
  #homeView .home-compact-decision-body h3 { font-size: 18px; }
  #homeView .home-compact-decision-arrow { font-size: 17px; }
}

@media (max-width: 380px) {
  #homeView .home-cockpit-decision-grid .home-simple-decision-meta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  #homeView .home-cockpit-decision-grid .home-simple-decision,
  #homeView .home-simple-decision-arrow,
  #homeView .home-compact-decision,
  #homeView .home-compact-decision-arrow { transition: none; }
  #homeView .home-cockpit-decision-grid .home-simple-decision:hover,
  #homeView .home-cockpit-decision-grid .home-simple-decision:focus-visible,
  #homeView .home-cockpit-decision-grid .home-simple-decision:hover .home-simple-decision-arrow,
  #homeView .home-cockpit-decision-grid .home-simple-decision:focus-visible .home-simple-decision-arrow,
  #homeView .home-compact-decision:hover .home-compact-decision-arrow,
  #homeView .home-compact-decision:focus-visible .home-compact-decision-arrow { transform: none; }
}
